diff --git a/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h index 574706721c5bfa..c1212025fc624a 100644 --- a/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h @@ -81,7 +81,7 @@ class ClusterCommand : public ModelCommand { timedInvokeTimeout:mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil - clientQueue:callbackQueue + queue:callbackQueue completion:^( NSArray *> * _Nullable values, NSError * _Nullable error) { responsesNeeded--; diff --git a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm index e8387b8dda5b84..a21e6e201a2419 100644 --- a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm @@ -31,25 +31,25 @@ ChipLogProgress(chipTool, "Sending command to node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId)); [commissioner getBaseDevice:mNodeId queue:callbackQueue - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - if (error != nil) { - SetCommandExitStatus(error, "Error getting connected device"); - return; - } - - CHIP_ERROR err; - if (device == nil) { - err = CHIP_ERROR_INTERNAL; - } else { - err = SendCommand(device, mEndPointId); - } - - if (err != CHIP_NO_ERROR) { - ChipLogError(chipTool, "Error: %s", chip::ErrorStr(err)); - SetCommandExitStatus(err); - return; - } - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + if (error != nil) { + SetCommandExitStatus(error, "Error getting connected device"); + return; + } + + CHIP_ERROR err; + if (device == nil) { + err = CHIP_ERROR_INTERNAL; + } else { + err = SendCommand(device, mEndPointId); + } + + if (err != CHIP_NO_ERROR) { + ChipLogError(chipTool, "Error: %s", chip::ErrorStr(err)); + SetCommandExitStatus(err); + return; + } + }]; return CHIP_NO_ERROR; } diff --git a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h index 08d10c92854e9a..ab6165f474f1ec 100644 --- a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h @@ -60,7 +60,7 @@ class ReadAttribute : public ModelCommand { clusterID:[NSNumber numberWithUnsignedInteger:mClusterId] attributeID:[NSNumber numberWithUnsignedInteger:mAttributeId] params:params - clientQueue:callbackQueue + queue:callbackQueue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { if (error != nil) { LogNSError("Error reading attribute", error); @@ -135,7 +135,7 @@ class SubscribeAttribute : public ModelCommand { minInterval:[NSNumber numberWithUnsignedInteger:mMinInterval] maxInterval:[NSNumber numberWithUnsignedInteger:mMaxInterval] params:params - clientQueue:callbackQueue + queue:callbackQueue reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { if (values) { for (id item in values) { diff --git a/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h index 4a4c838c6e1e1a..6c74b9bdb6744e 100644 --- a/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h @@ -81,7 +81,7 @@ class WriteAttribute : public ModelCommand { timedWriteTimeout:mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil - clientQueue:callbackQueue + queue:callbackQueue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { if (error != nil) { LogNSError("Error writing attribute", error); diff --git a/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm b/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm index 65d289ef64a624..b774b1a971b48a 100644 --- a/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm +++ b/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm @@ -36,13 +36,13 @@ [cluster openBasicCommissioningWindowWithParams:params expectedValues:nil expectedValueInterval:nil - completionHandler:^(NSError * _Nullable error) { - if (error == nil) { - self->SetCommandExitStatus(CHIP_NO_ERROR); - } else { - self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(error)); - } - }]; + completion:^(NSError * _Nullable error) { + if (error == nil) { + self->SetCommandExitStatus(CHIP_NO_ERROR); + } else { + self->SetCommandExitStatus(MTRErrorToCHIPErrorCode(error)); + } + }]; } else { [device openCommissioningWindowWithSetupPasscode:[MTRSetupPayload generateRandomSetupPasscode] diff --git a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm index 53d9d2da940b06..ae27e63d53d6fd 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm @@ -101,46 +101,47 @@ { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip-tool.command", DISPATCH_QUEUE_SERIAL); MTRDeviceController * commissioner = CurrentCommissioner(); - [commissioner getBaseDevice:mNodeId - queue:callbackQueue - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - CHIP_ERROR err = CHIP_NO_ERROR; - if (error) { - err = MTRErrorToCHIPErrorCode(error); - LogNSError("Error: ", error); - SetCommandExitStatus(err); - } else if (device == nil) { - ChipLogError(chipTool, "Error: %s", chip::ErrorStr(CHIP_ERROR_INTERNAL)); - SetCommandExitStatus(CHIP_ERROR_INTERNAL); - } else { - ChipLogProgress(chipTool, "Attempting to unpair device %llu", mNodeId); - MTRBaseClusterOperationalCredentials * opCredsCluster = - [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:callbackQueue]; - [opCredsCluster readAttributeCurrentFabricIndexWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable readError) { - if (readError) { - CHIP_ERROR readErr = MTRErrorToCHIPErrorCode(readError); - LogNSError("Failed to get current fabric: ", readError); - SetCommandExitStatus(readErr); - return; - } - MTROperationalCredentialsClusterRemoveFabricParams * params = - [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.fabricIndex = value; - [opCredsCluster - removeFabricWithParams:params - completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable removeError) { - CHIP_ERROR removeErr = CHIP_NO_ERROR; - if (removeError) { - removeErr = MTRErrorToCHIPErrorCode(removeError); - LogNSError("Failed to remove current fabric: ", removeError); - } else { - ChipLogProgress(chipTool, "Successfully unpaired deviceId %llu", mNodeId); - } - SetCommandExitStatus(removeErr); - }]; - }]; - } - }]; + [commissioner + getBaseDevice:mNodeId + queue:callbackQueue + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + CHIP_ERROR err = CHIP_NO_ERROR; + if (error) { + err = MTRErrorToCHIPErrorCode(error); + LogNSError("Error: ", error); + SetCommandExitStatus(err); + } else if (device == nil) { + ChipLogError(chipTool, "Error: %s", chip::ErrorStr(CHIP_ERROR_INTERNAL)); + SetCommandExitStatus(CHIP_ERROR_INTERNAL); + } else { + ChipLogProgress(chipTool, "Attempting to unpair device %llu", mNodeId); + MTRBaseClusterOperationalCredentials * opCredsCluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:callbackQueue]; + [opCredsCluster + readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable readError) { + if (readError) { + CHIP_ERROR readErr = MTRErrorToCHIPErrorCode(readError); + LogNSError("Failed to get current fabric: ", readError); + SetCommandExitStatus(readErr); + return; + } + MTROperationalCredentialsClusterRemoveFabricParams * params = + [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.fabricIndex = value; + [opCredsCluster + removeFabricWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable removeError) { + CHIP_ERROR removeErr = CHIP_NO_ERROR; + if (removeError) { + removeErr = MTRErrorToCHIPErrorCode(removeError); + LogNSError("Failed to remove current fabric: ", removeError); + } else { + ChipLogProgress(chipTool, "Successfully unpaired deviceId %llu", mNodeId); + } + SetCommandExitStatus(removeErr); + }]; + }]; + } + }]; } diff --git a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.h b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.h index 80ec40be778db4..f213e064019572 100644 --- a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.h +++ b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.h @@ -41,20 +41,20 @@ typedef NS_ENUM(uint8_t, UserConsentState) { - (void)handleQueryImageForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller params:(MTROtaSoftwareUpdateProviderClusterQueryImageParams * _Nonnull)params - completionHandler:(void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completion; - (void)handleApplyUpdateRequestForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller params:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams * _Nonnull)params - completionHandler: - (void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion: + (void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completion; - (void)handleNotifyUpdateAppliedForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller params:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams * _Nonnull)params - completionHandler:(StatusCompletion _Nonnull)completionHandler; + completion:(MTRStatusCompletion _Nonnull)completion; @property (strong, nonatomic, nullable) NSArray * candidates; @property (strong, nonatomic, nullable) DeviceSoftwareVersionModel * selectedCandidate; diff --git a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm index 9c56fad14efafc..50bb9086dc6801 100644 --- a/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm +++ b/examples/darwin-framework-tool/commands/provider/OTAProviderDelegate.mm @@ -48,14 +48,14 @@ - (instancetype)init - (void)handleQueryImageForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller params:(MTROtaSoftwareUpdateProviderClusterQueryImageParams * _Nonnull)params - completionHandler:(void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completion { auto isBDXProtocolSupported = [params.protocolsSupported containsObject:@(MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous)]; if (!isBDXProtocolSupported) { _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported); - completionHandler(_selectedCandidate, nil); + completion(_selectedCandidate, nil); return; } @@ -63,7 +63,7 @@ - (void)handleQueryImageForNodeID:(NSNumber * _Nonnull)nodeID if (!hasCandidate) { NSLog(@"Unable to select OTA Image."); _selectedCandidate.status = @(MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable); - completionHandler(_selectedCandidate, nil); + completion(_selectedCandidate, nil); return; } @@ -75,15 +75,15 @@ - (void)handleQueryImageForNodeID:(NSNumber * _Nonnull)nodeID _selectedCandidate.userConsentNeeded = _userConsentNeeded; NSLog(@"User Consent Needed: %@", _selectedCandidate.userConsentNeeded); } - completionHandler(_selectedCandidate, nil); + completion(_selectedCandidate, nil); } - (void)handleApplyUpdateRequestForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller params:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams * _Nonnull)params - completionHandler: - (void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion: + (void (^_Nonnull)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completion { MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * applyUpdateResponseParams = [[MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; @@ -95,22 +95,22 @@ - (void)handleApplyUpdateRequestForNodeID:(NSNumber * _Nonnull)nodeID applyUpdateResponseParams.timedInvokeTimeoutMs = _timedInvokeTimeoutMs; } - completionHandler(applyUpdateResponseParams, nil); + completion(applyUpdateResponseParams, nil); } - (void)handleNotifyUpdateAppliedForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller params:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams * _Nonnull)params - completionHandler:(StatusCompletion _Nonnull)completionHandler + completion:(MTRStatusCompletion _Nonnull)completion { - completionHandler(nil); + completion(nil); } - (void)handleBDXTransferSessionBeginForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller fileDesignator:(NSString * _Nonnull)fileDesignator offset:(NSNumber * _Nonnull)offset - completionHandler:(void (^)(NSError * error))completionHandler + completion:(void (^)(NSError * error))completion { NSLog(@"BDX TransferSession begin with %@ (offset: %@)", fileDesignator, offset); @@ -120,7 +120,7 @@ - (void)handleBDXTransferSessionBeginForNodeID:(NSNumber * _Nonnull)nodeID auto error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" code:MTRErrorCodeGeneralError userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(errorString, nil) }]; - completionHandler(error); + completion(error); return; } @@ -131,7 +131,7 @@ - (void)handleBDXTransferSessionBeginForNodeID:(NSNumber * _Nonnull)nodeID auto error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" code:MTRErrorCodeGeneralError userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(errorString, nil) }]; - completionHandler(error); + completion(error); return; } @@ -141,14 +141,14 @@ - (void)handleBDXTransferSessionBeginForNodeID:(NSNumber * _Nonnull)nodeID auto error = [[NSError alloc] initWithDomain:@"OTAProviderDomain" code:MTRErrorCodeGeneralError userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(errorString, nil) }]; - completionHandler(error); + completion(error); return; } _mFileHandle = handle; _mFileOffset = offset; _mFileEndOffset = @(endOffset); - completionHandler(nil); + completion(nil); } - (void)handleBDXTransferSessionEndForNodeID:(NSNumber * _Nonnull)nodeID @@ -166,7 +166,7 @@ - (void)handleBDXQueryForNodeID:(NSNumber * _Nonnull)nodeID blockSize:(NSNumber * _Nonnull)blockSize blockIndex:(NSNumber * _Nonnull)blockIndex bytesToSkip:(NSNumber * _Nonnull)bytesToSkip - completionHandler:(void (^)(NSData * _Nullable data, BOOL isEOF))completionHandler + completion:(void (^)(NSData * _Nullable data, BOOL isEOF))completion { NSLog(@"BDX Query received blockSize: %@, blockIndex: %@", blockSize, blockIndex); @@ -176,19 +176,19 @@ - (void)handleBDXQueryForNodeID:(NSNumber * _Nonnull)nodeID [_mFileHandle seekToOffset:offset error:&error]; if (error != nil) { NSLog(@"Error seeking to offset %@", @(offset)); - completionHandler(nil, NO); + completion(nil, NO); return; } NSData * data = [_mFileHandle readDataUpToLength:[blockSize unsignedLongValue] error:&error]; if (error != nil) { NSLog(@"Error reading file %@", _mFileHandle); - completionHandler(nil, NO); + completion(nil, NO); return; } BOOL isEOF = offset + [blockSize unsignedLongValue] >= [_mFileEndOffset unsignedLongLongValue]; - completionHandler(data, isEOF); + completion(data, isEOF); } - (void)SetOTAFilePath:(const char *)path diff --git a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h index 20bf5ea53fdee5..6edd466b9ae681 100644 --- a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h +++ b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h @@ -168,15 +168,15 @@ class TestCommandBridge : public CHIPCommandBridge, [controller getBaseDevice:value.nodeId queue:mCallbackQueue - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - if (error != nil) { - SetCommandExitStatus(error); - return; - } - - mConnectedDevices[identity] = device; - NextTest(); - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + if (error != nil) { + SetCommandExitStatus(error); + return; + } + + mConnectedDevices[identity] = device; + NextTest(); + }]; return CHIP_NO_ERROR; } diff --git a/examples/darwin-framework-tool/templates/commands.zapt b/examples/darwin-framework-tool/templates/commands.zapt index d17ae05a73f339..d144f717817dcf 100644 --- a/examples/darwin-framework-tool/templates/commands.zapt +++ b/examples/darwin-framework-tool/templates/commands.zapt @@ -56,7 +56,7 @@ public: uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster {{asLowerCamelCase name}}WithParams:params completionHandler: + [cluster {{asLowerCamelCase name}}WithParams:params completion: {{#if hasSpecificResponse}} ^(MTR{{asUpperCamelCase clusterName}}Cluster{{asUpperCamelCase responseName}}Params * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); @@ -116,11 +116,11 @@ public: MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; {{/if_is_fabric_scoped_struct}} - [cluster readAttribute{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}}{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeList")}}DeviceList{{else}}{{asUpperCamelCase name}}{{/if}}{{else}}{{asUpperCamelCase name}}{{/if}}With + [cluster readAttribute{{asUpperCamelCase name}}With {{~#if_is_fabric_scoped_struct type~}} - Params:params completionHandler: + Params:params completion: {{~else~}} - CompletionHandler: + Completion: {{~/if_is_fabric_scoped_struct~}} ^({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error) { NSLog(@"{{asUpperCamelCase parent.name}}.{{asUpperCamelCase name}} response %@", [value description]); @@ -176,7 +176,7 @@ public: {{asObjectiveCType type parent.name}} value = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:mValue]; {{/if_chip_complex}} - [cluster writeAttribute{{asUpperCamelCase name}}WithValue:value params:params completionHandler:^(NSError * _Nullable error) { + [cluster writeAttribute{{asUpperCamelCase name}}WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("{{asUpperCamelCase parent.name}} {{asUpperCamelCase name}} write Error", error); } diff --git a/examples/darwin-framework-tool/templates/tests/commands.zapt b/examples/darwin-framework-tool/templates/tests/commands.zapt index 2d1f547489bc4c..adfa4662f7b1c5 100644 --- a/examples/darwin-framework-tool/templates/tests/commands.zapt +++ b/examples/darwin-framework-tool/templates/tests/commands.zapt @@ -10,6 +10,8 @@ #include // For INFINITY +typedef void (^ResponseHandler)(id _Nullable value, NSError * _Nullable error); + class TestList : public Command { public: diff --git a/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt b/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt index 50ed90b3a3b59f..ac98bcb21f1742 100644 --- a/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt +++ b/examples/darwin-framework-tool/templates/tests/partials/test_cluster.zapt @@ -144,7 +144,7 @@ class {{filename}}: public TestCommandBridge {{#chip_tests_item_parameters}} {{>test_value target=(concat "params." (asStructPropertyName label)) definedValue=definedValue cluster=parent.cluster depth=0}} {{/chip_tests_item_parameters}} - [cluster {{asLowerCamelCase command}}With{{#if commandObject.arguments.length}}Params:params completionHandler{{else}}CompletionHandler{{/if}}: + [cluster {{asLowerCamelCase command}}With{{#if commandObject.arguments.length}}Params:params completion{{else}}Completion{{/if}}: {{#if commandObject.hasSpecificResponse}} ^(MTR{{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase commandObject.responseName}}Params * _Nullable values, NSError * _Nullable err) { {{else}} @@ -170,11 +170,11 @@ class {{filename}}: public TestCommandBridge MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:{{fabricFiltered}}]; {{/if_is_fabric_scoped_struct}} - [cluster readAttribute{{#if (isStrEqual (asUpperCamelCase cluster) "Descriptor")}}{{#if (isStrEqual (asUpperCamelCase attribute) "DeviceTypeList")}}DeviceList{{else}}{{asUpperCamelCase attribute}}{{/if}}{{else}}{{asUpperCamelCase attribute}}{{/if}}With + [cluster readAttribute{{asUpperCamelCase attribute}}With {{~#if_is_fabric_scoped_struct attributeObject.type~}} - Params:params completionHandler: + Params:params completion: {{~else~}} - CompletionHandler: + Completion: {{~/if_is_fabric_scoped_struct~}} ^({{asObjectiveCClass attributeObject.type cluster forceList=attributeObject.isArray}} * _Nullable value, NSError * _Nullable err) { {{else if isWriteAttribute}} @@ -182,7 +182,7 @@ class {{filename}}: public TestCommandBridge id {{asLowerCamelCase name}}Argument; {{>test_value target=(concat (asLowerCamelCase name) "Argument") definedValue=definedValue cluster=parent.cluster depth=0}} {{/chip_tests_item_parameters}} - [cluster writeAttribute{{asUpperCamelCase attribute}}WithValue:{{#chip_tests_item_parameters}}{{asLowerCamelCase name}}Argument{{/chip_tests_item_parameters}} completionHandler:^(NSError * _Nullable err) { + [cluster writeAttribute{{asUpperCamelCase attribute}}WithValue:{{#chip_tests_item_parameters}}{{asLowerCamelCase name}}Argument{{/chip_tests_item_parameters}} completion:^(NSError * _Nullable err) { {{/if}} NSLog(@"{{label}} Error: %@", err); diff --git a/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.h b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.h index 80a702aebfbbe8..c5bb54f33fd54f 100644 --- a/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.h +++ b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.h @@ -32,15 +32,15 @@ NS_ASSUME_NONNULL_BEGIN * @param endpointID endpoint ID of the attribute * @param clusterID cluster ID of the attribute * @param attributeID attribute ID of the attribute - * @param clientQueue client queue to dispatch the completion handler through + * @param queue client queue to dispatch the completion handler through * @param completion block to receive the result. * "values" received by the block will have the same format of object as the one received by completion block - * of MTRBaseDevice readAttributeWithEndpointID:clusterID:attributeID:clientQueue:completion method. + * of MTRBaseDevice readAttributeWithEndpointID:clusterID:attributeID:queue:completion method. */ - (void)readAttributeWithEndpointID:(NSNumber * _Nullable)endpointID clusterID:(NSNumber * _Nullable)clusterID attributeID:(NSNumber * _Nullable)attributeID - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion MTR_NEWLY_AVAILABLE; @end @@ -52,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN attributeId:(NSNumber * _Nullable)attributeId clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion - MTR_NEWLY_DEPRECATED("Please use readAttributeWithEndpointID:clusterID:attributeID:clientQueue:completion:"); + MTR_NEWLY_DEPRECATED("Please use readAttributeWithEndpointID:clusterID:attributeID:queue:completion:"); @end diff --git a/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.mm b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.mm index 919d40b73491ee..ce53d8d1597cad 100644 --- a/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.mm +++ b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.mm @@ -81,11 +81,11 @@ static CHIP_ERROR AppendAttibuteValueToArray( - (void)readAttributeWithEndpointID:(NSNumber * _Nullable)endpointID clusterID:(NSNumber * _Nullable)clusterID attributeID:(NSNumber * _Nullable)attributeID - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion { __auto_type completionHandler = ^(NSArray *> * _Nullable values, NSError * _Nullable error) { - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ completion(values, error); }); }; @@ -191,7 +191,7 @@ - (void)readAttributeWithEndpointId:(NSNumber * _Nullable)endpointId [self readAttributeWithEndpointID:endpointId clusterID:clusterId attributeID:attributeId - clientQueue:clientQueue + queue:clientQueue completion:completion]; } diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.h b/src/darwin/Framework/CHIP/MTRBaseDevice.h index 7efd3c2f0d1ddb..01e7b3dfd158b6 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.h @@ -17,6 +17,8 @@ #import +#import + @class MTRSetupPayload; NS_ASSUME_NONNULL_BEGIN @@ -170,8 +172,8 @@ extern NSString * const MTRArrayValueType; attributeReportHandler:(MTRDeviceReportHandler _Nullable)attributeReportHandler eventReportHandler:(MTRDeviceReportHandler _Nullable)eventReportHandler errorHandler:(MTRDeviceErrorHandler)errorHandler - subscriptionEstablished:(dispatch_block_t _Nullable)subscriptionEstablishedHandler - resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduledHandler MTR_NEWLY_AVAILABLE; + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduled MTR_NEWLY_AVAILABLE; /** * Read attribute in a designated attribute path @@ -180,7 +182,7 @@ extern NSString * const MTRArrayValueType; clusterID:(NSNumber * _Nullable)clusterID attributeID:(NSNumber * _Nullable)attributeID params:(MTRReadParams * _Nullable)params - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion MTR_NEWLY_AVAILABLE; /** @@ -194,14 +196,14 @@ extern NSString * const MTRArrayValueType; * @param completion response handler will receive either values or error. * * Received values are an NSArray object with response-value element as described in - * readAttributeWithEndpointID:clusterID:attributeID:clientQueue:completion:. + * readAttributeWithEndpointID:clusterID:attributeID:queue:completion:. */ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID value:(id)value timedWriteTimeout:(NSNumber * _Nullable)timeoutMs - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion MTR_NEWLY_AVAILABLE; /** @@ -221,7 +223,7 @@ extern NSString * const MTRArrayValueType; commandID:(NSNumber *)commandID commandFields:(id)commandFields timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion MTR_NEWLY_AVAILABLE; /** @@ -233,9 +235,9 @@ extern NSString * const MTRArrayValueType; minInterval:(NSNumber *)minInterval maxInterval:(NSNumber *)maxInterval params:(MTRSubscribeParams * _Nullable)params - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue reportHandler:(MTRDeviceResponseHandler)reportHandler - subscriptionEstablished:(dispatch_block_t _Nullable)subscriptionEstablishedHandler MTR_NEWLY_AVAILABLE; + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished MTR_NEWLY_AVAILABLE; /** * Deregister all local report handlers for a remote device @@ -244,7 +246,7 @@ extern NSString * const MTRArrayValueType; * There could be multiple clients accessing a node through a remote controller object and hence it is not appropriate * for one of those clients to shut down the entire stack to stop receiving reports. */ -- (void)deregisterReportHandlersWithClientQueue:(dispatch_queue_t)clientQueue completion:(dispatch_block_t)completion; +- (void)deregisterReportHandlersWithQueue:(dispatch_queue_t)queue completion:(dispatch_block_t)completion MTR_NEWLY_AVAILABLE; /** * Open a commissioning window on the device. @@ -355,7 +357,7 @@ extern NSString * const MTRArrayValueType; params:(MTRReadParams * _Nullable)params clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion - MTR_NEWLY_DEPRECATED("Please use readAttributeWithEndpointID:clusterID:attributeID:params:clientQueue:completion:"); + MTR_NEWLY_DEPRECATED("Please use readAttributeWithEndpointID:clusterID:attributeID:params:queue:completion:"); - (void)writeAttributeWithEndpointId:(NSNumber *)endpointId clusterId:(NSNumber *)clusterId @@ -364,8 +366,7 @@ extern NSString * const MTRArrayValueType; timedWriteTimeout:(NSNumber * _Nullable)timeoutMs clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion - MTR_NEWLY_DEPRECATED( - "Please use writeAttributeWithEndpointID:clusterID:attributeID:value:timedWriteTimeout:clientQueue:completion:"); + MTR_NEWLY_DEPRECATED("Please use writeAttributeWithEndpointID:clusterID:attributeID:value:timedWriteTimeout:queue:completion:"); - (void)invokeCommandWithEndpointId:(NSNumber *)endpointId clusterId:(NSNumber *)clusterId @@ -375,7 +376,7 @@ extern NSString * const MTRArrayValueType; clientQueue:(dispatch_queue_t)clientQueue completion:(MTRDeviceResponseHandler)completion MTR_NEWLY_DEPRECATED( - "Please use invokeCommandWithEndpointID:clusterID:commandID:commandFields:timedInvokeTimeout:clientQueue:completion"); + "Please use invokeCommandWithEndpointID:clusterID:commandID:commandFields:timedInvokeTimeout:queue:completion"); - (void)subscribeAttributeWithEndpointId:(NSNumber * _Nullable)endpointId clusterId:(NSNumber * _Nullable)clusterId @@ -388,7 +389,11 @@ extern NSString * const MTRArrayValueType; subscriptionEstablished:(dispatch_block_t _Nullable)subscriptionEstablishedHandler MTR_NEWLY_DEPRECATED( "Please use " - "subscribeAttributeWithEndpointID:clusterID:attributeID:params:minInterval:maxInterval:clientQueue:reportHandler:"); + "subscribeAttributeWithEndpointID:clusterID:attributeID:params:minInterval:maxInterval:queue:reportHandler:"); + +- (void)deregisterReportHandlersWithClientQueue:(dispatch_queue_t)queue + completion:(dispatch_block_t)completion + MTR_NEWLY_DEPRECATED("Pease use deregisterReportHandlersWithQueue:completion:"); @end diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index fc89e9268664ad..0c518e4b9c5515 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -246,7 +246,7 @@ - (void)invalidateCASESession public: SubscriptionCallback(DataReportCallback attributeReportCallback, DataReportCallback eventReportCallback, ErrorCallback errorCallback, MTRDeviceResubscriptionScheduledHandler _Nullable resubscriptionScheduledHandler, - SubscriptionEstablishedHandler _Nullable subscriptionEstablishedHandler, OnDoneHandler _Nullable onDoneHandler) + MTRSubscriptionEstablishedHandler _Nullable subscriptionEstablishedHandler, OnDoneHandler _Nullable onDoneHandler) : MTRBaseSubscriptionCallback(attributeReportCallback, eventReportCallback, errorCallback, resubscriptionScheduledHandler, subscriptionEstablishedHandler, onDoneHandler) { @@ -267,8 +267,8 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue attributeReportHandler:(MTRDeviceReportHandler _Nullable)attributeReportHandler eventReportHandler:(MTRDeviceReportHandler _Nullable)eventReportHandler errorHandler:(void (^)(NSError * error))errorHandler - subscriptionEstablished:(dispatch_block_t _Nullable)subscriptionEstablishedHandler - resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduledHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + resubscriptionScheduled:(MTRDeviceResubscriptionScheduledHandler _Nullable)resubscriptionScheduled { if (self.isPASEDevice) { // We don't support subscriptions over PASE. @@ -282,119 +282,120 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue params = [params copy]; [self.deviceController getSessionForNode:self.nodeID - completionHandler:^(ExchangeManager * _Nullable exchangeManager, const Optional & session, - NSError * _Nullable error) { - if (error != nil) { - dispatch_async(queue, ^{ - errorHandler(error); - }); - return; - } - - // Wildcard endpoint, cluster, attribute, event. - auto attributePath = std::make_unique(); - auto eventPath = std::make_unique(); - // We want to get event reports at the minInterval, not the maxInterval. - eventPath->mIsUrgentEvent = true; - ReadPrepareParams readParams(session.Value()); - readParams.mMinIntervalFloorSeconds = [minInterval unsignedShortValue]; - readParams.mMaxIntervalCeilingSeconds = [maxInterval unsignedShortValue]; - readParams.mpAttributePathParamsList = attributePath.get(); - readParams.mAttributePathParamsListSize = 1; - readParams.mpEventPathParamsList = eventPath.get(); - readParams.mEventPathParamsListSize = 1; - readParams.mKeepSubscriptions = [params.keepPreviousSubscriptions boolValue]; - - std::unique_ptr attributeCache; - ReadClient::Callback * callbackForReadClient = nullptr; - OnDoneHandler onDoneHandler = nil; - - if (attributeCacheContainer) { - __weak MTRAttributeCacheContainer * weakPtr = attributeCacheContainer; - onDoneHandler = ^{ - // This, like all manipulation of cppClusterStateCache, needs to run on the Matter - // queue. - MTRAttributeCacheContainer * container = weakPtr; - if (container) { - container.cppAttributeCache = nullptr; - } - }; - } - - auto callback = std::make_unique( - ^(NSArray * value) { - dispatch_async(queue, ^{ - if (attributeReportHandler != nil) { - attributeReportHandler(value); - } - }); - }, - ^(NSArray * value) { - dispatch_async(queue, ^{ - if (eventReportHandler != nil) { - eventReportHandler(value); - } - }); - }, - ^(NSError * error) { - dispatch_async(queue, ^{ - errorHandler(error); - }); - }, - ^(NSError * error, NSNumber * resubscriptionDelay) { - dispatch_async(queue, ^{ - if (resubscriptionScheduledHandler != nil) { - resubscriptionScheduledHandler(error, resubscriptionDelay); - } - }); - }, - ^(void) { - dispatch_async(queue, ^{ - if (subscriptionEstablishedHandler != nil) { - subscriptionEstablishedHandler(); - } - }); - }, - onDoneHandler); - - if (attributeCacheContainer) { - attributeCache = std::make_unique(*callback.get()); - callbackForReadClient = &attributeCache->GetBufferedCallback(); - } else { - callbackForReadClient = &callback->GetBufferedCallback(); - } - - auto readClient = std::make_unique(InteractionModelEngine::GetInstance(), - exchangeManager, *callbackForReadClient, ReadClient::InteractionType::Subscribe); - - CHIP_ERROR err; - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - err = readClient->SendRequest(readParams); - } else { - // SendAutoResubscribeRequest cleans up the params, even on failure. - attributePath.release(); - eventPath.release(); - err = readClient->SendAutoResubscribeRequest(std::move(readParams)); - } - - if (err != CHIP_NO_ERROR) { - dispatch_async(queue, ^{ - errorHandler([MTRError errorForCHIPErrorCode:err]); - }); - - return; - } - - if (attributeCacheContainer) { - attributeCacheContainer.cppAttributeCache = attributeCache.get(); - // ClusterStateCache will be deleted when OnDone is called or an error is encountered as well. - callback->AdoptAttributeCache(std::move(attributeCache)); - } - // Callback and ReadClient will be deleted when OnDone is called or an error is - // encountered. - callback->AdoptReadClient(std::move(readClient)); - callback.release(); - }]; + completion:^(ExchangeManager * _Nullable exchangeManager, const Optional & session, + NSError * _Nullable error) { + if (error != nil) { + dispatch_async(queue, ^{ + errorHandler(error); + }); + return; + } + + // Wildcard endpoint, cluster, attribute, event. + auto attributePath = std::make_unique(); + auto eventPath = std::make_unique(); + // We want to get event reports at the minInterval, not the maxInterval. + eventPath->mIsUrgentEvent = true; + ReadPrepareParams readParams(session.Value()); + readParams.mMinIntervalFloorSeconds = [minInterval unsignedShortValue]; + readParams.mMaxIntervalCeilingSeconds = [maxInterval unsignedShortValue]; + readParams.mpAttributePathParamsList = attributePath.get(); + readParams.mAttributePathParamsListSize = 1; + readParams.mpEventPathParamsList = eventPath.get(); + readParams.mEventPathParamsListSize = 1; + readParams.mKeepSubscriptions = [params.keepPreviousSubscriptions boolValue]; + + std::unique_ptr attributeCache; + ReadClient::Callback * callbackForReadClient = nullptr; + OnDoneHandler onDoneHandler = nil; + + if (attributeCacheContainer) { + __weak MTRAttributeCacheContainer * weakPtr = attributeCacheContainer; + onDoneHandler = ^{ + // This, like all manipulation of cppClusterStateCache, needs to run on the Matter + // queue. + MTRAttributeCacheContainer * container = weakPtr; + if (container) { + container.cppAttributeCache = nullptr; + } + }; + } + + auto callback = std::make_unique( + ^(NSArray * value) { + dispatch_async(queue, ^{ + if (attributeReportHandler != nil) { + attributeReportHandler(value); + } + }); + }, + ^(NSArray * value) { + dispatch_async(queue, ^{ + if (eventReportHandler != nil) { + eventReportHandler(value); + } + }); + }, + ^(NSError * error) { + dispatch_async(queue, ^{ + errorHandler(error); + }); + }, + ^(NSError * error, NSNumber * resubscriptionDelay) { + dispatch_async(queue, ^{ + if (resubscriptionScheduled != nil) { + resubscriptionScheduled(error, resubscriptionDelay); + } + }); + }, + ^(void) { + dispatch_async(queue, ^{ + if (subscriptionEstablished != nil) { + subscriptionEstablished(); + } + }); + }, + onDoneHandler); + + if (attributeCacheContainer) { + attributeCache = std::make_unique(*callback.get()); + callbackForReadClient = &attributeCache->GetBufferedCallback(); + } else { + callbackForReadClient = &callback->GetBufferedCallback(); + } + + auto readClient = std::make_unique(InteractionModelEngine::GetInstance(), + exchangeManager, *callbackForReadClient, ReadClient::InteractionType::Subscribe); + + CHIP_ERROR err; + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + err = readClient->SendRequest(readParams); + } else { + // SendAutoResubscribeRequest cleans up the params, even on failure. + attributePath.release(); + eventPath.release(); + err = readClient->SendAutoResubscribeRequest(std::move(readParams)); + } + + if (err != CHIP_NO_ERROR) { + dispatch_async(queue, ^{ + errorHandler([MTRError errorForCHIPErrorCode:err]); + }); + + return; + } + + if (attributeCacheContainer) { + attributeCacheContainer.cppAttributeCache = attributeCache.get(); + // ClusterStateCache will be deleted when OnDone is called or an error is encountered as + // well. + callback->AdoptAttributeCache(std::move(attributeCache)); + } + // Callback and ReadClient will be deleted when OnDone is called or an error is + // encountered. + callback->AdoptReadClient(std::move(readClient)); + callback.release(); + }]; } // Convert TLV data into data-value dictionary as described in MTRDeviceResponseHandler @@ -777,14 +778,14 @@ - (void)readAttributeWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID params:(MTRReadParams * _Nullable)params - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion { endpointID = (endpointID == nil) ? nil : [endpointID copy]; clusterID = (clusterID == nil) ? nil : [clusterID copy]; attributeID = (attributeID == nil) ? nil : [attributeID copy]; params = (params == nil) ? nil : [params copy]; - new MTRDataValueDictionaryCallbackBridge(clientQueue, self, completion, + new MTRDataValueDictionaryCallbackBridge(queue, self, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { auto successFn = chip::Callback::Callback::FromCancelable(success); @@ -887,10 +888,10 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID attributeID:(NSNumber *)attributeID value:(id)value timedWriteTimeout:(NSNumber * _Nullable)timeoutMs - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion { - new MTRDataValueDictionaryCallbackBridge(clientQueue, self, completion, + new MTRDataValueDictionaryCallbackBridge(queue, self, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { auto successFn = chip::Callback::Callback::FromCancelable(success); @@ -1027,7 +1028,7 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID commandID:(NSNumber *)commandID commandFields:(id)commandFields timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion { endpointID = (endpointID == nil) ? nil : [endpointID copy]; @@ -1038,7 +1039,7 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID commandFields = (commandFields == nil) ? nil : [commandFields copy]; timeoutMs = (timeoutMs == nil) ? nil : [timeoutMs copy]; - new MTRDataValueDictionaryCallbackBridge(clientQueue, self, completion, + new MTRDataValueDictionaryCallbackBridge(queue, self, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { auto successFn = chip::Callback::Callback::FromCancelable(success); @@ -1122,13 +1123,13 @@ - (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID minInterval:(NSNumber *)minInterval maxInterval:(NSNumber *)maxInterval params:(MTRSubscribeParams * _Nullable)params - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue reportHandler:(MTRDeviceResponseHandler)reportHandler - subscriptionEstablished:(SubscriptionEstablishedHandler)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler)subscriptionEstablished { if (self.isPASEDevice) { // We don't support subscriptions over PASE. - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]); }); return; @@ -1144,123 +1145,126 @@ - (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID [self.deviceController getSessionForNode:self.nodeID - completionHandler:^( - ExchangeManager * _Nullable exchangeManager, const Optional & session, NSError * _Nullable error) { - if (error != nil) { - if (reportHandler) { - dispatch_async(clientQueue, ^{ - reportHandler(nil, error); - }); - } - return; - } - - auto onReportCb = [clientQueue, reportHandler]( - const app::ConcreteAttributePath & attribPath, const MTRDataValueDictionaryDecodableType & data) { - id valueObject = data.GetDecodedObject(); - app::ConcreteAttributePath pathCopy = attribPath; - dispatch_async(clientQueue, ^{ - reportHandler( - @[ @ { MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:pathCopy], MTRDataKey : valueObject } ], - nil); - }); - }; - - auto establishedOrFailed = chip::Platform::MakeShared(NO); - auto onFailureCb = [establishedOrFailed, clientQueue, subscriptionEstablishedHandler, reportHandler]( - const app::ConcreteAttributePath * attribPath, CHIP_ERROR error) { - if (!(*establishedOrFailed)) { - *establishedOrFailed = YES; - if (subscriptionEstablishedHandler) { - dispatch_async(clientQueue, subscriptionEstablishedHandler); - } - } - if (reportHandler) { - dispatch_async(clientQueue, ^{ - reportHandler(nil, [MTRError errorForCHIPErrorCode:error]); - }); - } - }; - - auto onEstablishedCb = [establishedOrFailed, clientQueue, subscriptionEstablishedHandler]() { - if (*establishedOrFailed) { - return; - } - *establishedOrFailed = YES; - if (subscriptionEstablishedHandler) { - dispatch_async(clientQueue, subscriptionEstablishedHandler); - } - }; - - MTRReadClientContainer * container = [[MTRReadClientContainer alloc] init]; - container.deviceID = self.nodeID; - container.pathParams = Platform::New(); - if (endpointID) { - container.pathParams->mEndpointId = static_cast([endpointID unsignedShortValue]); - } - if (clusterID) { - container.pathParams->mClusterId = static_cast([clusterID unsignedLongValue]); - } - if (attributeID) { - container.pathParams->mAttributeId = static_cast([attributeID unsignedLongValue]); - } - - app::InteractionModelEngine * engine = app::InteractionModelEngine::GetInstance(); - CHIP_ERROR err = CHIP_NO_ERROR; - - chip::app::ReadPrepareParams readParams(session.Value()); - readParams.mpAttributePathParamsList = container.pathParams; - readParams.mAttributePathParamsListSize = 1; - readParams.mMinIntervalFloorSeconds = static_cast([minInterval unsignedShortValue]); - readParams.mMaxIntervalCeilingSeconds = static_cast([maxInterval unsignedShortValue]); - readParams.mIsFabricFiltered = (params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - readParams.mKeepSubscriptions - = (params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - - auto onDone = [container](BufferedReadAttributeCallback * callback) { - [container onDone]; - // Make sure we delete callback last, because doing that actually destroys our - // lambda, so we can't access captured values after that. - chip::Platform::Delete(callback); - }; - - auto callback = chip::Platform::MakeUnique>( - container.pathParams->mClusterId, container.pathParams->mAttributeId, onReportCb, onFailureCb, onDone, - onEstablishedCb); - - auto readClient = Platform::New( - engine, exchangeManager, callback->GetBufferedCallback(), chip::app::ReadClient::InteractionType::Subscribe); - - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - err = readClient->SendRequest(readParams); - } else { - err = readClient->SendAutoResubscribeRequest(std::move(readParams)); - } - - if (err != CHIP_NO_ERROR) { - if (reportHandler) { - dispatch_async(clientQueue, ^{ - reportHandler(nil, [MTRError errorForCHIPErrorCode:err]); - }); - } - Platform::Delete(readClient); - Platform::Delete(container.pathParams); - container.pathParams = nullptr; - return; - } - - // Read clients will be purged when deregistered. - container.readClientPtr = readClient; - AddReadClientContainer(container.deviceID, container); - callback.release(); - }]; + completion:^(ExchangeManager * _Nullable exchangeManager, const Optional & session, + NSError * _Nullable error) { + if (error != nil) { + if (reportHandler) { + dispatch_async(queue, ^{ + reportHandler(nil, error); + }); + } + return; + } + + auto onReportCb = [queue, reportHandler](const app::ConcreteAttributePath & attribPath, + const MTRDataValueDictionaryDecodableType & data) { + id valueObject = data.GetDecodedObject(); + app::ConcreteAttributePath pathCopy = attribPath; + dispatch_async(queue, ^{ + reportHandler(@[ @ { + MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:pathCopy], + MTRDataKey : valueObject + } ], + nil); + }); + }; + + auto establishedOrFailed = chip::Platform::MakeShared(NO); + auto onFailureCb = [establishedOrFailed, queue, subscriptionEstablished, reportHandler]( + const app::ConcreteAttributePath * attribPath, CHIP_ERROR error) { + if (!(*establishedOrFailed)) { + *establishedOrFailed = YES; + if (subscriptionEstablished) { + dispatch_async(queue, subscriptionEstablished); + } + } + if (reportHandler) { + dispatch_async(queue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:error]); + }); + } + }; + + auto onEstablishedCb = [establishedOrFailed, queue, subscriptionEstablished]() { + if (*establishedOrFailed) { + return; + } + *establishedOrFailed = YES; + if (subscriptionEstablished) { + dispatch_async(queue, subscriptionEstablished); + } + }; + + MTRReadClientContainer * container = [[MTRReadClientContainer alloc] init]; + container.deviceID = self.nodeID; + container.pathParams = Platform::New(); + if (endpointID) { + container.pathParams->mEndpointId = static_cast([endpointID unsignedShortValue]); + } + if (clusterID) { + container.pathParams->mClusterId = static_cast([clusterID unsignedLongValue]); + } + if (attributeID) { + container.pathParams->mAttributeId = static_cast([attributeID unsignedLongValue]); + } + + app::InteractionModelEngine * engine = app::InteractionModelEngine::GetInstance(); + CHIP_ERROR err = CHIP_NO_ERROR; + + chip::app::ReadPrepareParams readParams(session.Value()); + readParams.mpAttributePathParamsList = container.pathParams; + readParams.mAttributePathParamsListSize = 1; + readParams.mMinIntervalFloorSeconds = static_cast([minInterval unsignedShortValue]); + readParams.mMaxIntervalCeilingSeconds = static_cast([maxInterval unsignedShortValue]); + readParams.mIsFabricFiltered + = (params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + readParams.mKeepSubscriptions + = (params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + + auto onDone = [container](BufferedReadAttributeCallback * callback) { + [container onDone]; + // Make sure we delete callback last, because doing that actually destroys our + // lambda, so we can't access captured values after that. + chip::Platform::Delete(callback); + }; + + auto callback = chip::Platform::MakeUnique>( + container.pathParams->mClusterId, container.pathParams->mAttributeId, onReportCb, onFailureCb, onDone, + onEstablishedCb); + + auto readClient = Platform::New( + engine, exchangeManager, callback->GetBufferedCallback(), chip::app::ReadClient::InteractionType::Subscribe); + + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + err = readClient->SendRequest(readParams); + } else { + err = readClient->SendAutoResubscribeRequest(std::move(readParams)); + } + + if (err != CHIP_NO_ERROR) { + if (reportHandler) { + dispatch_async(queue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:err]); + }); + } + Platform::Delete(readClient); + Platform::Delete(container.pathParams); + container.pathParams = nullptr; + return; + } + + // Read clients will be purged when deregistered. + container.readClientPtr = readClient; + AddReadClientContainer(container.deviceID, container); + callback.release(); + }]; } -- (void)deregisterReportHandlersWithClientQueue:(dispatch_queue_t)clientQueue completion:(dispatch_block_t)completion +- (void)deregisterReportHandlersWithQueue:(dispatch_queue_t)queue completion:(dispatch_block_t)completion { // This method must only be used for MTRDeviceOverXPC. However, for unit testing purpose, the method purges all read clients. MTR_LOG_DEBUG("Unexpected call to deregister report handlers"); - PurgeReadClientContainers(self.nodeID, clientQueue, completion); + PurgeReadClientContainers(self.nodeID, queue, completion); } namespace { @@ -1403,10 +1407,10 @@ - (void)openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode #ifdef DEBUG // This method is for unit testing only -- (void)failSubscribers:(dispatch_queue_t)clientQueue completion:(void (^)(void))completion +- (void)failSubscribers:(dispatch_queue_t)queue completion:(void (^)(void))completion { MTR_LOG_DEBUG("Causing failure in subscribers on purpose"); - CauseReadClientFailure(self.nodeID, clientQueue, completion); + CauseReadClientFailure(self.nodeID, queue, completion); } #endif @@ -1488,7 +1492,7 @@ - (void)readAttributeWithEndpointId:(NSNumber * _Nullable)endpointId clusterID:clusterId attributeID:attributeId params:params - clientQueue:clientQueue + queue:clientQueue completion:completion]; } @@ -1505,7 +1509,7 @@ - (void)writeAttributeWithEndpointId:(NSNumber *)endpointId attributeID:attributeId value:value timedWriteTimeout:timeoutMs - clientQueue:clientQueue + queue:clientQueue completion:completion]; } @@ -1522,7 +1526,7 @@ - (void)invokeCommandWithEndpointId:(NSNumber *)endpointId commandID:commandId commandFields:commandFields timedInvokeTimeout:timeoutMs - clientQueue:clientQueue + queue:clientQueue completion:completion]; } @@ -1542,11 +1546,16 @@ - (void)subscribeAttributeWithEndpointId:(NSNumber * _Nullable)endpointId minInterval:minInterval maxInterval:maxInterval params:params - clientQueue:clientQueue + queue:clientQueue reportHandler:reportHandler subscriptionEstablished:subscriptionEstablishedHandler]; } +- (void)deregisterReportHandlersWithClientQueue:(dispatch_queue_t)queue completion:(dispatch_block_t)completion +{ + [self deregisterReportHandlersWithQueue:queue completion:completion]; +} + @end @implementation MTRAttributePath diff --git a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h index a434ec889bf1cd..3ea7d4c0fb8260 100644 --- a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h +++ b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h @@ -34,8 +34,10 @@ */ // TODO: ADD NS_ASSUME_NONNULL_BEGIN to this header. When that happens, note -// that in MTRActionBlock the two callback pointers are nonnull. +// that in MTRActionBlock the two callback pointers are nonnull and the two +// arguments of ResponseHandler are both nullable. +typedef void (^ResponseHandler)(id value, NSError * error); typedef CHIP_ERROR (^MTRActionBlock)(chip::Messaging::ExchangeManager & exchangeManager, const chip::SessionHandle & session, chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure); typedef CHIP_ERROR (^MTRLocalActionBlock)(chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure); @@ -136,10 +138,10 @@ template class MTRCallbackBridge { LogRequestStart(); BOOL ok = [controller getSessionForNode:nodeID - completionHandler:^(chip::Messaging::ExchangeManager * exchangeManager, - const chip::Optional & session, NSError * error) { - MaybeDoAction(exchangeManager, session, error); - }]; + completion:^(chip::Messaging::ExchangeManager * exchangeManager, + const chip::Optional & session, NSError * error) { + MaybeDoAction(exchangeManager, session, error); + }]; if (ok == NO) { OnFailureFn(this, CHIP_ERROR_INCORRECT_STATE); diff --git a/src/darwin/Framework/CHIP/MTRCluster.h b/src/darwin/Framework/CHIP/MTRCluster.h index ce6dc57683c4c0..3b8b0386fce946 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.h +++ b/src/darwin/Framework/CHIP/MTRCluster.h @@ -17,10 +17,16 @@ #import +MTR_NEWLY_DEPRECATED("ResponseHandler is not used") typedef void (^ResponseHandler)(id _Nullable value, NSError * _Nullable error); +MTR_NEWLY_DEPRECATED("Please use MTRStatusCompletion instead") typedef void (^StatusCompletion)(NSError * _Nullable error); +MTR_NEWLY_DEPRECATED("Please use MTRSubscriptionEstablishedHandler instead") typedef void (^SubscriptionEstablishedHandler)(void); +typedef void (^MTRStatusCompletion)(NSError * _Nullable error); +typedef void (^MTRSubscriptionEstablishedHandler)(void); + @class MTRBaseDevice; NS_ASSUME_NONNULL_BEGIN diff --git a/src/darwin/Framework/CHIP/MTRControllerFactory.mm b/src/darwin/Framework/CHIP/MTRControllerFactory.mm index 3a98ae78997f2f..adf826141ee3ba 100644 --- a/src/darwin/Framework/CHIP/MTRControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRControllerFactory.mm @@ -210,6 +210,7 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams DeviceLayer::PlatformMgrImpl().StartEventLoopTask(); + __block CHIP_ERROR errorCode = CHIP_NO_ERROR; dispatch_sync(_chipWorkQueue, ^{ if ([self isRunning]) { return; @@ -224,6 +225,49 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams } if (startupParams.otaProviderDelegate) { + if (![startupParams.otaProviderDelegate respondsToSelector:@selector(handleQueryImageForNodeID: + controller:params:completion:)] + && ![startupParams.otaProviderDelegate + respondsToSelector:@selector(handleQueryImageForNodeID:controller:params:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleQueryImageForNodeID"); + errorCode = CHIP_ERROR_INVALID_ARGUMENT; + return; + } + if (![startupParams.otaProviderDelegate + respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completion:)] + && ![startupParams.otaProviderDelegate + respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleApplyUpdateRequestForNodeID"); + errorCode = CHIP_ERROR_INVALID_ARGUMENT; + return; + } + if (![startupParams.otaProviderDelegate + respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID:controller:params:completion:)] + && ![startupParams.otaProviderDelegate + respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID:controller:params:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleNotifyUpdateAppliedForNodeID"); + errorCode = CHIP_ERROR_INVALID_ARGUMENT; + return; + } + if (![startupParams.otaProviderDelegate + respondsToSelector:@selector(handleBDXTransferSessionBeginForNodeID: + controller:fileDesignator:offset:completion:)] + && ![startupParams.otaProviderDelegate + respondsToSelector:@selector + (handleBDXTransferSessionBeginForNodeID:controller:fileDesignator:offset:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleBDXTransferSessionBeginForNodeID"); + errorCode = CHIP_ERROR_INVALID_ARGUMENT; + return; + } + if (![startupParams.otaProviderDelegate + respondsToSelector:@selector(handleBDXQueryForNodeID:controller:blockSize:blockIndex:bytesToSkip:completion:)] + && ![startupParams.otaProviderDelegate + respondsToSelector:@selector(handleBDXQueryForNodeID: + controller:blockSize:blockIndex:bytesToSkip:completionHandler:)]) { + MTR_LOG_ERROR("Error: MTROTAProviderDelegate does not support handleBDXQueryForNodeID"); + errorCode = CHIP_ERROR_INVALID_ARGUMENT; + return; + } _otaProviderDelegateBridge = new MTROTAProviderDelegateBridge(startupParams.otaProviderDelegate); if (_otaProviderDelegateBridge == nil) { MTR_LOG_ERROR("Error: %@", kErrorOtaProviderInit); @@ -238,7 +282,7 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams return; } - CHIP_ERROR errorCode = _keystore->Init(_persistentStorageDelegateBridge); + errorCode = _keystore->Init(_persistentStorageDelegateBridge); if (errorCode != CHIP_NO_ERROR) { MTR_LOG_ERROR("Error: %@", kErrorKeystoreInit); return; diff --git a/src/darwin/Framework/CHIP/MTRDevice.h b/src/darwin/Framework/CHIP/MTRDevice.h index 01881f3bbb5b54..e76ec45889a4fc 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.h +++ b/src/darwin/Framework/CHIP/MTRDevice.h @@ -140,8 +140,8 @@ typedef NS_ENUM(NSUInteger, MTRDeviceState) { expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval timedInvokeTimeout:(NSNumber * _Nullable)timeout - clientQueue:(dispatch_queue_t)clientQueue - completion:(MTRDeviceResponseHandler)completion; + queue:(dispatch_queue_t)queue + completion:(MTRDeviceResponseHandler)completion MTR_NEWLY_AVAILABLE; /** * Open a commissioning window on the device. @@ -204,6 +204,19 @@ typedef NS_ENUM(NSUInteger, MTRDeviceState) { deviceController:(MTRDeviceController *)deviceController MTR_NEWLY_DEPRECATED("Please use deviceWithNodeID:controller:"); +- (void)invokeCommandWithEndpointID:(NSNumber *)endpointID + clusterID:(NSNumber *)clusterID + commandID:(NSNumber *)commandID + commandFields:(id)commandFields + expectedValues:(NSArray *> * _Nullable)expectedValues + expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval + timedInvokeTimeout:(NSNumber * _Nullable)timeout + clientQueue:(dispatch_queue_t)queue + completion:(MTRDeviceResponseHandler)completion + MTR_NEWLY_DEPRECATED("Please use " + "invokeCommandWithEndpointID:clusterID:commandID:commandFields:expectedValues:expectedValueInterval:" + "timedInvokeTimeout:queue:completion:"); + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 694b779c13956a..f85ce312a14115 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -295,90 +295,90 @@ - (void)subscribeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)max _subscriptionActive = YES; [_deviceController getSessionForNode:_nodeID.unsignedLongLongValue - completionHandler:^(chip::Messaging::ExchangeManager * _Nullable exchangeManager, - const chip::Optional & session, NSError * _Nullable error) { - if (error != nil) { - dispatch_async(self.queue, ^{ - [self _handleSubscriptionError:error]; - }); - return; - } - - // Wildcard endpoint, cluster, attribute, event. - auto attributePath = std::make_unique(); - auto eventPath = std::make_unique(); - // We want to get event reports at the minInterval, not the maxInterval. - eventPath->mIsUrgentEvent = true; - ReadPrepareParams readParams(session.Value()); - readParams.mMinIntervalFloorSeconds = minInterval; - readParams.mMaxIntervalCeilingSeconds = maxInterval; - readParams.mpAttributePathParamsList = attributePath.get(); - readParams.mAttributePathParamsListSize = 1; - readParams.mpEventPathParamsList = eventPath.get(); - readParams.mEventPathParamsListSize = 1; - readParams.mKeepSubscriptions = true; - attributePath.release(); - eventPath.release(); - - std::unique_ptr callback; - std::unique_ptr readClient; - std::unique_ptr attributeCache; - callback = std::make_unique( - ^(NSArray * value) { - dispatch_async(self.queue, ^{ - // OnAttributeData (after OnReportEnd) - [self _handleAttributeReport:value]; - }); - }, - ^(NSArray * value) { - dispatch_async(self.queue, ^{ - // OnEventReport (after OnReportEnd) - [self _handleEventReport:value]; - }); - }, - ^(NSError * error) { - dispatch_async(self.queue, ^{ - // OnError - [self _handleSubscriptionError:error]; - }); - }, - ^(NSError * error, NSNumber * resubscriptionDelay) { - dispatch_async(self.queue, ^{ - // OnResubscriptionNeeded - [self _handleResubscriptionNeeded]; - }); - }, - ^(void) { - dispatch_async(self.queue, ^{ - // OnSubscriptionEstablished - [self _handleSubscriptionEstablished]; - }); - }, - ^(void) { - dispatch_async(self.queue, ^{ - // OnDone - [self _handleSubscriptionReset]; - }); - }); - readClient = std::make_unique(InteractionModelEngine::GetInstance(), exchangeManager, - callback->GetBufferedCallback(), ReadClient::InteractionType::Subscribe); - - // SendAutoResubscribeRequest cleans up the params, even on failure. - CHIP_ERROR err = readClient->SendAutoResubscribeRequest(std::move(readParams)); - - if (err != CHIP_NO_ERROR) { - dispatch_async(self.queue, ^{ - [self _handleSubscriptionError:[MTRError errorForCHIPErrorCode:err]]; - }); - - return; - } - - // Callback and ReadClient will be deleted when OnDone is called or an error is - // encountered. - callback->AdoptReadClient(std::move(readClient)); - callback.release(); - }]; + completion:^(chip::Messaging::ExchangeManager * _Nullable exchangeManager, + const chip::Optional & session, NSError * _Nullable error) { + if (error != nil) { + dispatch_async(self.queue, ^{ + [self _handleSubscriptionError:error]; + }); + return; + } + + // Wildcard endpoint, cluster, attribute, event. + auto attributePath = std::make_unique(); + auto eventPath = std::make_unique(); + // We want to get event reports at the minInterval, not the maxInterval. + eventPath->mIsUrgentEvent = true; + ReadPrepareParams readParams(session.Value()); + readParams.mMinIntervalFloorSeconds = minInterval; + readParams.mMaxIntervalCeilingSeconds = maxInterval; + readParams.mpAttributePathParamsList = attributePath.get(); + readParams.mAttributePathParamsListSize = 1; + readParams.mpEventPathParamsList = eventPath.get(); + readParams.mEventPathParamsListSize = 1; + readParams.mKeepSubscriptions = true; + attributePath.release(); + eventPath.release(); + + std::unique_ptr callback; + std::unique_ptr readClient; + std::unique_ptr attributeCache; + callback = std::make_unique( + ^(NSArray * value) { + dispatch_async(self.queue, ^{ + // OnAttributeData (after OnReportEnd) + [self _handleAttributeReport:value]; + }); + }, + ^(NSArray * value) { + dispatch_async(self.queue, ^{ + // OnEventReport (after OnReportEnd) + [self _handleEventReport:value]; + }); + }, + ^(NSError * error) { + dispatch_async(self.queue, ^{ + // OnError + [self _handleSubscriptionError:error]; + }); + }, + ^(NSError * error, NSNumber * resubscriptionDelay) { + dispatch_async(self.queue, ^{ + // OnResubscriptionNeeded + [self _handleResubscriptionNeeded]; + }); + }, + ^(void) { + dispatch_async(self.queue, ^{ + // OnSubscriptionEstablished + [self _handleSubscriptionEstablished]; + }); + }, + ^(void) { + dispatch_async(self.queue, ^{ + // OnDone + [self _handleSubscriptionReset]; + }); + }); + readClient = std::make_unique(InteractionModelEngine::GetInstance(), exchangeManager, + callback->GetBufferedCallback(), ReadClient::InteractionType::Subscribe); + + // SendAutoResubscribeRequest cleans up the params, even on failure. + CHIP_ERROR err = readClient->SendAutoResubscribeRequest(std::move(readParams)); + + if (err != CHIP_NO_ERROR) { + dispatch_async(self.queue, ^{ + [self _handleSubscriptionError:[MTRError errorForCHIPErrorCode:err]]; + }); + + return; + } + + // Callback and ReadClient will be deleted when OnDone is called or an error is + // encountered. + callback->AdoptReadClient(std::move(readClient)); + callback.release(); + }]; } #pragma mark Device Interactions @@ -397,7 +397,7 @@ - (void)subscribeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)max clusterID:clusterID attributeID:attributeID params:params - clientQueue:self.queue + queue:self.queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { if (values) { // Since the format is the same data-value dictionary, this looks like an attribute @@ -440,12 +440,12 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [self newBaseDevice]; [baseDevice - writeAttributeWithEndpointId:endpointID - clusterId:clusterID - attributeId:attributeID + writeAttributeWithEndpointID:endpointID + clusterID:clusterID + attributeID:attributeID value:value timedWriteTimeout:timeout - clientQueue:self.queue + queue:self.queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { if (values) { [self _handleAttributeReport:values]; @@ -472,7 +472,7 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval timedInvokeTimeout:(NSNumber * _Nullable)timeout - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion { if (timeout) { @@ -487,14 +487,14 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [self newBaseDevice]; [baseDevice - invokeCommandWithEndpointId:endpointID - clusterId:clusterID - commandId:commandID + invokeCommandWithEndpointID:endpointID + clusterID:clusterID + commandID:commandID commandFields:commandFields timedInvokeTimeout:timeout - clientQueue:self.queue + queue:self.queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ completion(values, error); }); [workItem endWork]; @@ -748,6 +748,27 @@ + (instancetype)deviceWithNodeID:(uint64_t)nodeID deviceController:(MTRDeviceCon return [self deviceWithNodeID:@(nodeID) controller:deviceController]; } +- (void)invokeCommandWithEndpointID:(NSNumber *)endpointID + clusterID:(NSNumber *)clusterID + commandID:(NSNumber *)commandID + commandFields:(id)commandFields + expectedValues:(NSArray *> * _Nullable)expectedValues + expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval + timedInvokeTimeout:(NSNumber * _Nullable)timeout + clientQueue:(dispatch_queue_t)queue + completion:(MTRDeviceResponseHandler)completion +{ + [self invokeCommandWithEndpointID:endpointID + clusterID:clusterID + commandID:commandID + commandFields:commandFields + expectedValues:expectedValues + expectedValueInterval:expectedValueInterval + timedInvokeTimeout:timeout + queue:queue + completion:completion]; +} + @end #pragma mark - SubscriptionCallback diff --git a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h index db8cff52a48d3f..192829e94e3f40 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.h @@ -157,7 +157,7 @@ typedef void (^MTRValuesHandler)(id _Nullable values, NSError * _Nullable error) maxInterval:(NSNumber *)maxInterval params:(NSDictionary * _Nullable)params shouldCache:(BOOL)shouldCache - completion:(StatusCompletion)completion; + completion:(MTRStatusCompletion)completion; /** * Requests reading attribute cache diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index c4e5f4fa055ce3..3c00843f25cefd 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -129,7 +129,7 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS - (nullable MTRBaseDevice *)getDeviceBeingCommissioned:(uint64_t)deviceId error:(NSError * __autoreleasing *)error; - (BOOL)getBaseDevice:(uint64_t)deviceID queue:(dispatch_queue_t)queue - completionHandler:(MTRDeviceConnectionCallback)completionHandler; + completion:(MTRDeviceConnectionCallback)completion MTR_NEWLY_AVAILABLE; - (BOOL)openPairingWindow:(uint64_t)deviceID duration:(NSUInteger)duration error:(NSError * __autoreleasing *)error; - (nullable NSString *)openPairingWindowWithPIN:(uint64_t)deviceID @@ -201,6 +201,11 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS - (nullable NSData *)fetchAttestationChallengeForDeviceId:(uint64_t)deviceId MTR_NEWLY_DEPRECATED("Please use fetchAttestationChallengeForDeviceID"); +- (BOOL)getBaseDevice:(uint64_t)deviceID + queue:(dispatch_queue_t)queue + completionHandler:(MTRDeviceConnectionCallback)completionHandler + MTR_NEWLY_DEPRECATED("Please use [MTRBaseDevice deviceWithNodeID:controller:]"); + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 2dc0e4c71999d6..bef2ef3d750a6f 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -572,36 +572,10 @@ - (MTRBaseDevice *)getDeviceBeingCommissioned:(uint64_t)deviceId error:(NSError return device; } -- (BOOL)getBaseDevice:(uint64_t)deviceID - queue:(dispatch_queue_t)queue - completionHandler:(MTRDeviceConnectionCallback)completionHandler +- (BOOL)getBaseDevice:(uint64_t)deviceID queue:(dispatch_queue_t)queue completion:(MTRDeviceConnectionCallback)completion { - NSError * error; - if (![self checkIsRunning:&error]) { - dispatch_async(queue, ^{ - completionHandler(nil, error); - }); - return NO; - } - - // We know getSessionForNode will return YES here, since we already checked - // that we are running. - return [self getSessionForNode:deviceID - completionHandler:^(chip::Messaging::ExchangeManager * _Nullable exchangeManager, - const chip::Optional & session, NSError * _Nullable error) { - // Create an MTRBaseDevice for the node id involved, now that our - // CASE session is primed. We don't actually care about the session - // information here. - dispatch_async(queue, ^{ - MTRBaseDevice * device; - if (error == nil) { - device = [[MTRBaseDevice alloc] initWithNodeID:@(deviceID) controller:self]; - } else { - device = nil; - } - completionHandler(device, error); - }); - }]; + // Will get removed once deviceWithNodeID exists. + return [self getBaseDevice:deviceID queue:queue completionHandler:completion]; } - (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID @@ -862,7 +836,7 @@ - (BOOL)_deviceBeingCommissionedOverBLE:(uint64_t)deviceID return deviceProxy->GetDeviceTransportType() == chip::Transport::Type::kBle; } -- (BOOL)getSessionForNode:(chip::NodeId)nodeID completionHandler:(MTRInternalDeviceConnectionCallback)completionHandler +- (BOOL)getSessionForNode:(chip::NodeId)nodeID completion:(MTRInternalDeviceConnectionCallback)completion { if (![self checkIsRunning]) { return NO; @@ -871,14 +845,14 @@ - (BOOL)getSessionForNode:(chip::NodeId)nodeID completionHandler:(MTRInternalDev dispatch_async(_chipWorkQueue, ^{ NSError * error; if (![self checkIsRunning:&error]) { - completionHandler(nullptr, chip::NullOptional, error); + completion(nullptr, chip::NullOptional, error); return; } - auto connectionBridge = new MTRDeviceConnectionBridge(completionHandler); + auto connectionBridge = new MTRDeviceConnectionBridge(completion); // MTRDeviceConnectionBridge always delivers errors async via - // completionHandler. + // completion. connectionBridge->connect(self->_cppCommissioner, nodeID); }); @@ -1012,4 +986,34 @@ - (nullable NSData *)fetchAttestationChallengeForDeviceId:(uint64_t)deviceId return [self fetchAttestationChallengeForDeviceID:deviceId]; } +- (BOOL)getBaseDevice:(uint64_t)deviceID queue:(dispatch_queue_t)queue completionHandler:(MTRDeviceConnectionCallback)completion +{ + NSError * error; + if (![self checkIsRunning:&error]) { + dispatch_async(queue, ^{ + completion(nil, error); + }); + return NO; + } + + // We know getSessionForNode will return YES here, since we already checked + // that we are running. + return [self getSessionForNode:deviceID + completion:^(chip::Messaging::ExchangeManager * _Nullable exchangeManager, + const chip::Optional & session, NSError * _Nullable error) { + // Create an MTRBaseDevice for the node id involved, now that our + // CASE session is primed. We don't actually care about the session + // information here. + dispatch_async(queue, ^{ + MTRBaseDevice * device; + if (error == nil) { + device = [[MTRBaseDevice alloc] initWithNodeID:@(deviceID) controller:self]; + } else { + device = nil; + } + completion(device, error); + }); + }]; +} + @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m index fcca97a9234b0e..98d36b2627527b 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m @@ -108,9 +108,7 @@ - (nullable MTRBaseDevice *)getDeviceBeingCommissioned:(uint64_t)deviceID error: return nil; } -- (BOOL)getBaseDevice:(uint64_t)deviceID - queue:(dispatch_queue_t)queue - completionHandler:(MTRDeviceConnectionCallback)completionHandler +- (BOOL)getBaseDevice:(uint64_t)deviceID queue:(dispatch_queue_t)queue completion:(MTRDeviceConnectionCallback)completion { dispatch_async(_workQueue, ^{ dispatch_group_t group = dispatch_group_create(); @@ -140,9 +138,9 @@ - (BOOL)getBaseDevice:(uint64_t)deviceID MTRDeviceOverXPC * device = [[MTRDeviceOverXPC alloc] initWithController:self.controllerID deviceID:@(deviceID) xpcConnection:self.xpcConnection]; - completionHandler(device, nil); + completion(device, nil); } else { - completionHandler(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); } }); }); diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h index caacb273029cc4..bb20c6b397c38a 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h @@ -114,11 +114,11 @@ NS_ASSUME_NONNULL_BEGIN * dispatch to the Matter queue). * * If the controller is not running when this function is called, will return NO - * and never invoke the completionHandler. If the controller is not running - * when the async dispatch on the Matter queue would happen, an error will be - * dispatched to the completion handler. + * and never invoke the completion. If the controller is not running when the + * async dispatch on the Matter queue would happen, an error will be dispatched + * to the completion handler. */ -- (BOOL)getSessionForNode:(chip::NodeId)nodeID completionHandler:(MTRInternalDeviceConnectionCallback)completionHandler; +- (BOOL)getSessionForNode:(chip::NodeId)nodeID completion:(MTRInternalDeviceConnectionCallback)completion; /** * Get a session for the commissionee device with the given device id. This may diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h index 6e1871a0c3e2dd..942429a352dd76 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.h @@ -16,6 +16,7 @@ */ #import "MTRBaseDevice.h" +#import "MTRCluster.h" // For MTRSubscriptionEstablishedHandler #import "MTRDeviceControllerXPCConnection.h" NS_ASSUME_NONNULL_BEGIN @@ -28,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN minInterval:(NSNumber *)minInterval maxInterval:(NSNumber *)maxInterval reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - subscriptionEstablished:(dispatch_block_t _Nullable)subscriptionEstablishedHandler NS_UNAVAILABLE; + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler NS_UNAVAILABLE; - (instancetype)initWithController:(id)controller deviceID:(NSNumber *)deviceID diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m index 11f6da46f6fbaa..3b5504252540ef 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.m @@ -95,12 +95,12 @@ - (void)readAttributeWithEndpointID:(NSNumber * _Nullable)endpointID clusterID:(NSNumber * _Nullable)clusterID attributeID:(NSNumber * _Nullable)attributeID params:(MTRReadParams * _Nullable)params - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Reading attribute ..."); [_xpcConnection - getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { if (handle) { [handle.proxy readAttributeWithController:self.controller nodeId:self.nodeID.unsignedLongLongValue @@ -109,7 +109,7 @@ - (void)readAttributeWithEndpointID:(NSNumber * _Nullable)endpointID attributeId:attributeID params:[MTRDeviceController encodeXPCReadParams:params] completion:^(id _Nullable values, NSError * _Nullable error) { - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ MTR_LOG_DEBUG("Attribute read"); completion([MTRDeviceController decodeXPCResponseValues:values], error); // The following captures the proxy handle in the closure so that the @@ -119,7 +119,7 @@ - (void)readAttributeWithEndpointID:(NSNumber * _Nullable)endpointID }); }]; } else { - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ MTR_LOG_ERROR("Failed to obtain XPC connection to read attribute"); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); }); @@ -132,12 +132,12 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID attributeID:(NSNumber *)attributeID value:(id)value timedWriteTimeout:(NSNumber * _Nullable)timeoutMs - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Writing attribute ..."); [_xpcConnection - getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { if (handle) { [handle.proxy writeAttributeWithController:self.controller nodeId:self.nodeID.unsignedLongLongValue @@ -147,7 +147,7 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID value:value timedWriteTimeout:timeoutMs completion:^(id _Nullable values, NSError * _Nullable error) { - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ MTR_LOG_DEBUG("Attribute written"); completion([MTRDeviceController decodeXPCResponseValues:values], error); // The following captures the proxy handle in the closure so that the @@ -157,7 +157,7 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID }); }]; } else { - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ MTR_LOG_ERROR("Failed to obtain XPC connection to write attribute"); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); }); @@ -170,12 +170,12 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID commandID:(NSNumber *)commandID commandFields:(id)commandFields timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion { MTR_LOG_DEBUG("Invoking command ..."); [_xpcConnection - getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { if (handle) { [handle.proxy invokeCommandWithController:self.controller nodeId:self.nodeID.unsignedLongLongValue @@ -185,7 +185,7 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID fields:commandFields timedInvokeTimeout:timeoutMs completion:^(id _Nullable values, NSError * _Nullable error) { - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ MTR_LOG_DEBUG("Command invoked"); completion([MTRDeviceController decodeXPCResponseValues:values], error); // The following captures the proxy handle in the closure so that the @@ -195,7 +195,7 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID }); }]; } else { - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ MTR_LOG_ERROR("Failed to obtain XPC connection to invoke command"); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); }); @@ -209,13 +209,13 @@ - (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID minInterval:(NSNumber *)minInterval maxInterval:(NSNumber *)maxInterval params:(MTRSubscribeParams * _Nullable)params - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue reportHandler:(MTRDeviceResponseHandler)reportHandler subscriptionEstablished:(void (^_Nullable)(void))subscriptionEstablishedHandler { MTR_LOG_DEBUG("Subscribing attribute ..."); [_xpcConnection getProxyHandleWithCompletion:^( - dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { if (handle) { MTR_LOG_DEBUG("Setup report handler"); [self.xpcConnection @@ -228,7 +228,7 @@ - (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID } if (!values) { MTR_LOG_DEBUG("Error report received"); - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ reportHandler(values, error); }); return; @@ -247,7 +247,7 @@ - (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID } if ([filteredValues count] > 0) { MTR_LOG_DEBUG("Report received"); - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ reportHandler(filteredValues, error); }); } @@ -261,7 +261,7 @@ - (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID maxInterval:maxInterval params:[MTRDeviceController encodeXPCSubscribeParams:params] establishedHandler:^{ - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ MTR_LOG_DEBUG("Subscription established"); subscriptionEstablishedHandler(); // The following captures the proxy handle in the closure so that the handle @@ -271,7 +271,7 @@ - (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID }); }]; } else { - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ MTR_LOG_ERROR("Failed to obtain XPC connection to subscribe to attribute"); subscriptionEstablishedHandler(); reportHandler(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); @@ -280,13 +280,13 @@ - (void)subscribeAttributeWithEndpointID:(NSNumber * _Nullable)endpointID }]; } -- (void)deregisterReportHandlersWithClientQueue:(dispatch_queue_t)clientQueue completion:(void (^)(void))completion +- (void)deregisterReportHandlersWithQueue:(dispatch_queue_t)queue completion:(void (^)(void))completion { MTR_LOG_DEBUG("Deregistering report handlers"); [_xpcConnection deregisterReportHandlersWithController:self.controller nodeID:self.nodeID completion:^{ - dispatch_async(clientQueue, completion); + dispatch_async(queue, completion); }]; } diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h b/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h index 70265a45f76cbd..8f750c9cf235b5 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegate.h @@ -32,49 +32,72 @@ typedef void (^MTRBDXQueryCompletionHandler)(NSData * _Nullable data, BOOL isEOF * The protocol definition for the MTROTAProviderDelegate * * All delegate methods will be called on the supplied Delegate Queue. + * + * While the selectors on this protocol are marked @optional, in practice an + * implementation must provide an implementation for one of each pair of + * selectors (e.g. one of the two handleQueryImageForNodeID selectors must be + * implemented). The selector ending in "completion:" will be used if present; + * otherwise the one ending in "completionHandler:" will be used. */ @protocol MTROTAProviderDelegate -@required +@optional /** * Notify the delegate when the query image command is received from some node. * The controller identifies the fabric the node is on, and the nodeID * identifies the node within that fabric. * - * If completionHandler is passed a non-nil error, that will be converted into + * If completion is passed a non-nil error, that will be converted into * an error response to the client. Otherwise it must have a non-nil data, * which will be returned to the client. */ - (void)handleQueryImageForNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller params:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params - completionHandler:(MTRQueryImageCompletionHandler)completionHandler; + completion:(MTRQueryImageCompletionHandler)completion MTR_NEWLY_AVAILABLE; +- (void)handleQueryImageForNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + params:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use the selector ending in completion:"); /** * Notify the delegate when the apply update request command is received from * some node. The controller identifies the fabric the node is on, and the * nodeID identifies the node within that fabric. * - * If completionHandler is passed a non-nil error, that will be converted into + * If completion is passed a non-nil error, that will be converted into * an error response to the client. Otherwise it must have a non-nil data, * which will be returned to the client. */ - (void)handleApplyUpdateRequestForNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller params:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params - completionHandler:(MTRApplyUpdateRequestCompletionHandler)completionHandler; + completion:(MTRApplyUpdateRequestCompletionHandler)completion MTR_NEWLY_AVAILABLE; +- (void)handleApplyUpdateRequestForNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + params:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use the selector ending in completion:"); /** * Notify the delegate when the notify update applied command is received from * some node. The controller identifies the fabric the node is on, and the * nodeID identifies the node within that fabric. * - * If completionHandler is passed a non-nil error, that will be converted into + * If completion is passed a non-nil error, that will be converted into * an error response to the client. Otherwise a success response will be sent. */ - (void)handleNotifyUpdateAppliedForNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller params:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)handleNotifyUpdateAppliedForNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + params:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completionHandler:(StatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use the selector ending in completion:"); /** * Notify the delegate when a BDX Session starts for some node. The controller @@ -85,7 +108,13 @@ typedef void (^MTRBDXQueryCompletionHandler)(NSData * _Nullable data, BOOL isEOF controller:(MTRDeviceController *)controller fileDesignator:(NSString *)fileDesignator offset:(NSNumber *)offset - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)handleBDXTransferSessionBeginForNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + fileDesignator:(NSString *)fileDesignator + offset:(NSNumber *)offset + completionHandler:(void (^)(NSError * error))completionHandler + MTR_NEWLY_DEPRECATED("Please use the selector ending in completion:"); /** * Notify the delegate when a BDX Session ends for some node. The controller @@ -106,7 +135,15 @@ typedef void (^MTRBDXQueryCompletionHandler)(NSData * _Nullable data, BOOL isEOF blockSize:(NSNumber *)blockSize blockIndex:(NSNumber *)blockIndex bytesToSkip:(NSNumber *)bytesToSkip - completionHandler:(MTRBDXQueryCompletionHandler)completionHandler; + completion:(MTRBDXQueryCompletionHandler)completion MTR_NEWLY_AVAILABLE; +- (void)handleBDXQueryForNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller + blockSize:(NSNumber *)blockSize + blockIndex:(NSNumber *)blockIndex + bytesToSkip:(NSNumber *)bytesToSkip + completionHandler:(void (^)(NSData * _Nullable data, BOOL isEOF))completionHandler + MTR_NEWLY_DEPRECATED("Please use the selector ending in completion:"); + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm index 4c29380befaa0a..8d82a33d6940df 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm @@ -155,11 +155,20 @@ CHIP_ERROR OnTransferSessionBegin(TransferSession::OutputEvent & event) auto strongDelegate = mDelegate; dispatch_async(mWorkQueue, ^{ - [strongDelegate handleBDXTransferSessionBeginForNodeID:nodeId - controller:controller - fileDesignator:fileDesignator - offset:offset - completionHandler:completionHandler]; + if ([strongDelegate respondsToSelector:@selector + (handleBDXTransferSessionBeginForNodeID:controller:fileDesignator:offset:completion:)]) { + [strongDelegate handleBDXTransferSessionBeginForNodeID:nodeId + controller:controller + fileDesignator:fileDesignator + offset:offset + completion:completionHandler]; + } else { + [strongDelegate handleBDXTransferSessionBeginForNodeID:nodeId + controller:controller + fileDesignator:fileDesignator + offset:offset + completionHandler:completionHandler]; + } }); return CHIP_NO_ERROR; @@ -233,12 +242,22 @@ CHIP_ERROR OnBlockQuery(TransferSession::OutputEvent & event) auto strongDelegate = mDelegate; dispatch_async(mWorkQueue, ^{ - [strongDelegate handleBDXQueryForNodeID:nodeId - controller:controller - blockSize:blockSize - blockIndex:blockIndex - bytesToSkip:bytesToSkip - completionHandler:completionHandler]; + if ([strongDelegate respondsToSelector:@selector + (handleBDXQueryForNodeID:controller:blockSize:blockIndex:bytesToSkip:completion:)]) { + [strongDelegate handleBDXQueryForNodeID:nodeId + controller:controller + blockSize:blockSize + blockIndex:blockIndex + bytesToSkip:bytesToSkip + completion:completionHandler]; + } else { + [strongDelegate handleBDXQueryForNodeID:nodeId + controller:controller + blockSize:blockSize + blockIndex:blockIndex + bytesToSkip:bytesToSkip + completionHandler:completionHandler]; + } }); return CHIP_NO_ERROR; @@ -506,10 +525,17 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath auto strongDelegate = mDelegate; dispatch_async(mWorkQueue, ^{ - [strongDelegate handleQueryImageForNodeID:@(nodeId) - controller:controller - params:commandParams - completionHandler:completionHandler]; + if ([strongDelegate respondsToSelector:@selector(handleQueryImageForNodeID:controller:params:completion:)]) { + [strongDelegate handleQueryImageForNodeID:@(nodeId) + controller:controller + params:commandParams + completion:completionHandler]; + } else { + [strongDelegate handleQueryImageForNodeID:@(nodeId) + controller:controller + params:commandParams + completionHandler:completionHandler]; + } }); } @@ -547,10 +573,17 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath auto strongDelegate = mDelegate; dispatch_async(mWorkQueue, ^{ - [strongDelegate handleApplyUpdateRequestForNodeID:@(nodeId) - controller:controller - params:commandParams - completionHandler:completionHandler]; + if ([strongDelegate respondsToSelector:@selector(handleApplyUpdateRequestForNodeID:controller:params:completion:)]) { + [strongDelegate handleApplyUpdateRequestForNodeID:@(nodeId) + controller:controller + params:commandParams + completion:completionHandler]; + } else { + [strongDelegate handleApplyUpdateRequestForNodeID:@(nodeId) + controller:controller + params:commandParams + completionHandler:completionHandler]; + } }); } @@ -582,10 +615,17 @@ bool GetPeerNodeInfo(CommandHandler * commandHandler, const ConcreteCommandPath auto strongDelegate = mDelegate; dispatch_async(mWorkQueue, ^{ - [strongDelegate handleNotifyUpdateAppliedForNodeID:@(nodeId) - controller:controller - params:commandParams - completionHandler:completionHandler]; + if ([strongDelegate respondsToSelector:@selector(handleNotifyUpdateAppliedForNodeID:controller:params:completion:)]) { + [strongDelegate handleNotifyUpdateAppliedForNodeID:@(nodeId) + controller:controller + params:commandParams + completion:completionHandler]; + } else { + [strongDelegate handleNotifyUpdateAppliedForNodeID:@(nodeId) + controller:controller + params:commandParams + completionHandler:completionHandler]; + } }); } diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index c3dce6e28697ff..5d9fc8aa31fde5 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -44,27 +44,27 @@ using chip::SessionHandle; {{#chip_cluster_commands}} {{#*inline "callbackName"}}{{#if hasSpecificResponse}}{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase responseName}}{{else}}CommandSuccess{{/if}}{{/inline}} {{#unless (hasArguments)}} -- (void){{asLowerCamelCase name}}WithCompletionHandler:({{>command_completion_type command=.}})completionHandler +- (void){{asLowerCamelCase name}}WithCompletion:({{>command_completion_type command=.}})completion { - [self {{asLowerCamelCase name}}WithParams:nil completionHandler:completionHandler]; + [self {{asLowerCamelCase name}}WithParams:nil completion:completion]; } {{/unless}} -- (void){{asLowerCamelCase name}}WithParams: (MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completionHandler:({{>command_completion_type command=.}})completionHandler +- (void){{asLowerCamelCase name}}WithParams: (MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completion:({{>command_completion_type command=.}})completion { // Make a copy of params before we go async. params = [params copy]; new MTR{{>callbackName}}CallbackBridge(self.callbackQueue, self.device, {{#if hasSpecificResponse}} - {{! This treats completionHandler as taking an id for the data. This is + {{! This treats completion as taking an id for the data. This is not great from a type-safety perspective, of course. }} - completionHandler, + completion, {{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. }} ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, {{/if}} ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -104,15 +104,14 @@ using chip::SessionHandle; {{/chip_cluster_commands}} {{#chip_server_cluster_attributes}} -{{!Backwards compat for now: Treat DeviceTypeList as DeviceList. Ideally we would have both, not just DeviceList. }} -{{#*inline "attribute"}}Attribute{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}}{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeList")}}DeviceList{{else}}{{asUpperCamelCase name}}{{/if}}{{else}}{{asUpperCamelCase name}}{{/if}}{{/inline}} +{{#*inline "attribute"}}Attribute{{asUpperCamelCase name}}{{/inline}} - (void)read{{>attribute}}With {{~#if_is_fabric_scoped_struct type~}} - Params:(MTRReadParams * _Nullable)params completionHandler: + Params:(MTRReadParams * _Nullable)params completion: {{~else~}} - CompletionHandler: + Completion: {{~/if_is_fabric_scoped_struct~}} -(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completionHandler +(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion { {{~#if_is_fabric_scoped_struct type}} // Make a copy of params before we go async. @@ -120,9 +119,9 @@ using chip::SessionHandle; {{/if_is_fabric_scoped_struct~}} new MTR{{>attribute_data_callback_name}}CallbackBridge(self.callbackQueue, self.device, - {{! This treats completionHandler as taking an id for the data. This is + {{! This treats completion as taking an id for the data. This is not great from a type-safety perspective, of course. }} - completionHandler, + completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; auto successFn = Callback<{{>attribute_data_callback_name}}Callback>::FromCancelable(success); @@ -138,11 +137,11 @@ using chip::SessionHandle; {{#if isWritableAttribute}} {{#*inline "callbackName"}}DefaultSuccess{{/inline}} -- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completionHandler:(StatusCompletion)completionHandler +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completion:(MTRStatusCompletion)completion { - [self write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:nil completionHandler:completionHandler]; + [self write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:nil completion:completion]; } -- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -154,7 +153,7 @@ using chip::SessionHandle; to invoke our completion handler. This is not great from a type-safety perspective, of course. }} ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -184,9 +183,10 @@ using chip::SessionHandle; {{/if}} {{#if isReportableAttribute}} -- (void) subscribe{{>attribute}}WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void) Newsubscribe{{>attribute}}WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params -subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler +subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -214,13 +214,13 @@ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEs chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; } ); - }, subscriptionEstablishedHandler); + }, subscriptionEstablished); } -+ (void) read{{>attribute}}WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completionHandler ++ (void) read{{>attribute}}WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion { new MTR{{>attribute_data_callback_name}}CallbackBridge(queue, - completionHandler, + completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; @@ -248,6 +248,57 @@ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEs @implementation MTRBaseCluster{{asUpperCamelCase name}} (Deprecated) +{{#chip_cluster_commands}} +- (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completionHandler:({{>command_completion_type command=.}})completionHandler +{ + [self {{asLowerCamelCase name}}WithParams:params completion:completionHandler]; +} +{{#unless (hasArguments)}} +- (void){{asLowerCamelCase name}}WithCompletionHandler:({{>command_completion_type command=.}})completionHandler +{ + [self {{asLowerCamelCase name}}WithParams:nil completion:completionHandler]; +} +{{/unless}} +{{/chip_cluster_commands}} + +{{#chip_server_cluster_attributes}} +{{!Backwards compat for now: Treat DeviceTypeList as DeviceList. Ideally we would have both, not just DeviceList. }} +{{#*inline "attribute"}}Attribute{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}}{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeList")}}DeviceList{{else}}{{asUpperCamelCase name}}{{/if}}{{else}}{{asUpperCamelCase name}}{{/if}}{{/inline}} +{{! TODO: We need a better setup for the API_AVALABLE annotations here; this does not scale at all sanely. }} +- (void)read{{>attribute}}With +{{~#if_is_fabric_scoped_struct type~}} + Params:(MTRReadParams * _Nullable)params completionHandler: +{{~else~}} + CompletionHandler: +{{~/if_is_fabric_scoped_struct~}} +(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttribute{{asUpperCamelCase name}}With{{#if_is_fabric_scoped_struct type}}Params:params completion:{{else}}Completion:{{/if_is_fabric_scoped_struct}}completionHandler]; +} +{{#if isWritableAttribute}} +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttribute{{asUpperCamelCase name}}WithValue:value params:nil completion:completionHandler]; +} +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttribute{{asUpperCamelCase name}}WithValue:value params:params completion:completionHandler]; +} +{{/if}} +{{#if isReportableAttribute}} +- (void) subscribe{{>attribute}}WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params +subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttribute{{asUpperCamelCase name}}WithMinInterval:minInterval maxInterval:maxInterval params:params subscriptionEstablished:subscriptionEstablishedHandler reportHandler:reportHandler]; +} ++ (void) read{{>attribute}}WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttribute{{asUpperCamelCase name}}WithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} +{{/if}} +{{/chip_server_cluster_attributes}} + - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt index 94f8c001efda74..56c1badc01aee8 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt @@ -23,36 +23,35 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; {{#chip_cluster_commands}} -- (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completionHandler:({{>command_completion_type command=.}})completionHandler; +- (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completion:({{>command_completion_type command=.}})completion MTR_NEWLY_AVAILABLE; {{#unless (hasArguments)}} -- (void){{asLowerCamelCase name}}WithCompletionHandler:({{>command_completion_type command=.}})completionHandler; +- (void){{asLowerCamelCase name}}WithCompletion:({{>command_completion_type command=.}})completion MTR_NEWLY_AVAILABLE; {{/unless}} {{/chip_cluster_commands}} {{#chip_server_cluster_attributes}} -{{!Backwards compat for now: Treat DeviceTypeList as DeviceList. Ideally we would have both, not just DeviceList. }} -{{#*inline "attribute"}}Attribute{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}}{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeList")}}DeviceList{{else}}{{asUpperCamelCase name}}{{/if}}{{else}}{{asUpperCamelCase name}}{{/if}}{{/inline}} -{{! TODO: We need a better setup for the API_AVALABLE annotations here; this does not scale at all sanely. }} +{{#*inline "attribute"}}Attribute{{asUpperCamelCase name}}{{/inline}} - (void)read{{>attribute}}With {{~#if_is_fabric_scoped_struct type~}} - Params:(MTRReadParams * _Nullable)params completionHandler: + Params:(MTRReadParams * _Nullable)params completion: {{~else~}} - CompletionHandler: + Completion: {{~/if_is_fabric_scoped_struct~}} -(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "TestCluster")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}}; +(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; {{#if isWritableAttribute}} -- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completionHandler:(StatusCompletion)completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "TestCluster")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}}; -- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "TestCluster")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}}; +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; {{/if}} {{#if isReportableAttribute}} /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void) subscribe{{>attribute}}WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can remove the "New" bit. +- (void) Newsubscribe{{>attribute}}WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params -subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "TestCluster")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}}; -+ (void) read{{>attribute}}WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "TestCluster")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}}; +subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void) read{{>attribute}}WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; {{/if}} {{/chip_server_cluster_attributes}} @@ -101,6 +100,44 @@ API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +{{#chip_cluster_commands}} +- (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params completionHandler:({{>command_completion_type command=.}})completionHandler + MTR_NEWLY_DEPRECATED("Please use {{asLowerCamelCase name}}WithParams:completion:"); +{{#unless (hasArguments)}} +- (void){{asLowerCamelCase name}}WithCompletionHandler:({{>command_completion_type command=.}})completionHandler + MTR_NEWLY_DEPRECATED("Please use {{asLowerCamelCase name}}WithCompletion:"); +{{/unless}} +{{/chip_cluster_commands}} + +{{#chip_server_cluster_attributes}} +{{!Backwards compat for now: Treat DeviceTypeList as DeviceList. Ideally we would have both, not just DeviceList. }} +{{#*inline "attribute"}}Attribute{{#if (isStrEqual (asUpperCamelCase parent.name) "Descriptor")}}{{#if (isStrEqual (asUpperCamelCase name) "DeviceTypeList")}}DeviceList{{else}}{{asUpperCamelCase name}}{{/if}}{{else}}{{asUpperCamelCase name}}{{/if}}{{/inline}} +{{! TODO: We need a better setup for the API_AVALABLE annotations here; this does not scale at all sanely. }} +- (void)read{{>attribute}}With +{{~#if_is_fabric_scoped_struct type~}} + Params:(MTRReadParams * _Nullable)params completionHandler: +{{~else~}} + CompletionHandler: +{{~/if_is_fabric_scoped_struct~}} +(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "TestCluster")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}} + MTR_NEWLY_DEPRECATED("Please use read{{>attribute}}With{{#if_is_fabric_scoped_struct type}}Params:completion:{{else}}Completion:{{/if_is_fabric_scoped_struct}}"); +{{#if isWritableAttribute}} +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completionHandler:(MTRStatusCompletion)completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "TestCluster")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}} + MTR_NEWLY_DEPRECATED("Please use write{{>attribute}}WithValue:completion:"); +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "TestCluster")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}} + MTR_NEWLY_DEPRECATED("Please use write{{>attribute}}WithValue:params:completion:"); +{{/if}} +{{#if isReportableAttribute}} +{{! TODO: We need a better setup for the API_AVALABLE annotations here; this does not scale at all sanely. }} +- (void) subscribe{{>attribute}}WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params +subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "TestCluster")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}} + MTR_NEWLY_DEPRECATED("Please use subscribe{{>attribute}}WithParams:subscriptionEstablished:"); ++ (void) read{{>attribute}}WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completionHandler {{#if (isStrEqual (asUpperCamelCase parent.name) "TestCluster")}}{{#if (isStrEqual (asUpperCamelCase name) "WriteOnlyInt8u")}}API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)){{/if}}{{/if}} + MTR_NEWLY_DEPRECATED("Please use read{{>attribute}}WithAttributeCache:endpoint:queue:completion:"); +{{/if}} +{{/chip_server_cluster_attributes}} + @end {{/chip_client_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt index ed34c450dccacd..76acf303d10c3e 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt @@ -46,12 +46,12 @@ using chip::SessionHandle; {{#chip_cluster_commands}} {{#*inline "callbackName"}}{{#if hasSpecificResponse}}{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase responseName}}{{else}}CommandSuccess{{/if}}{{/inline}} {{#unless (hasArguments)}} -- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completionHandler:({{>command_completion_type command=.}})completionHandler +- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion { - [self {{asLowerCamelCase name}}WithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; + [self {{asLowerCamelCase name}}WithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } {{/unless}} -- (void){{asLowerCamelCase name}}WithParams: (MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completionHandler:({{>command_completion_type command=.}})completionHandler +- (void){{asLowerCamelCase name}}WithParams: (MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion { // Make a copy of params before we go async. params = [params copy]; @@ -65,15 +65,15 @@ using chip::SessionHandle; new MTR{{>callbackName}}CallbackBridge(self.callbackQueue, baseDevice, {{#if hasSpecificResponse}} - {{! This treats completionHandler as taking an id for the data. This is + {{! This treats completion as taking an id for the data. This is not great from a type-safety perspective, of course. }} - completionHandler, + completion, {{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. }} ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, {{/if}} @@ -161,6 +161,18 @@ using chip::SessionHandle; return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +{{#chip_cluster_commands}} +- (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:({{>command_completion_type command=.}})completionHandler +{ + [self {{asLowerCamelCase name}}WithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +{{#unless (hasArguments)}} +- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completionHandler:({{>command_completion_type command=.}})completionHandler +{ + [self {{asLowerCamelCase name}}WithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +{{/unless}} +{{/chip_cluster_commands}} @end {{/chip_client_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt index 050009b74f174d..12c0d35ec54484 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt @@ -21,13 +21,13 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRCluster{{asUpperCamelCase name}} : MTRCluster - (nullable instancetype)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; {{#chip_cluster_commands}} -- (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:({{>command_completion_type command=.}})completionHandler; +- (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion MTR_NEWLY_AVAILABLE; {{#unless (hasArguments)}} -- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completionHandler:({{>command_completion_type command=.}})completionHandler; +- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion MTR_NEWLY_AVAILABLE; {{/unless}} {{/chip_cluster_commands}} @@ -56,6 +56,12 @@ NS_ASSUME_NONNULL_BEGIN endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +{{#chip_cluster_commands}} +- (void){{asLowerCamelCase name}}WithParams:(MTR{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Params * {{#unless (commandHasRequiredField .)}}_Nullable{{/unless}})params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:({{>command_completion_type command=.}})completionHandler MTR_NEWLY_DEPRECATED("Please use {{asLowerCamelCase name}}WithParams:expectedValues:expectedValueIntervalMs:completion:"); +{{#unless (hasArguments)}} +- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completionHandler:({{>command_completion_type command=.}})completionHandler MTR_NEWLY_DEPRECATED("Please use {{asLowerCamelCase name}}WithExpectedValues:expectedValueIntervalMs:completion:"); +{{/unless}} +{{/chip_cluster_commands}} @end {{/chip_client_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt b/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt index 97bca6ef30f86a..40656f44ce3a0c 100644 --- a/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt @@ -46,12 +46,12 @@ public: class MTR{{> @partial-block}}SubscriptionBridge : public MTR{{> @partial-block}}Bridge { public: - MTR{{> @partial-block}}SubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) + MTR{{> @partial-block}}SubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTR{{> @partial-block}}Bridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTR{{> @partial-block}}SubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) + MTR{{> @partial-block}}SubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTR{{> @partial-block}}Bridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -59,7 +59,7 @@ public: static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; {{/unless}} diff --git a/src/darwin/Framework/CHIP/templates/partials/command_completion_type.zapt b/src/darwin/Framework/CHIP/templates/partials/command_completion_type.zapt index 9fc5fa8ad3af4d..5e99dc53e9adc8 100644 --- a/src/darwin/Framework/CHIP/templates/partials/command_completion_type.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/command_completion_type.zapt @@ -1,5 +1,5 @@ {{#if command.hasSpecificResponse}} void (^)(MTR{{asUpperCamelCase command.parent.name}}Cluster{{asUpperCamelCase command.responseName}}Params * _Nullable data, NSError * _Nullable error) {{else}} -StatusCompletion +MTRStatusCompletion {{/if}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index cd9170e7a370bf..63aa528945e090 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -34,140 +34,159 @@ NS_ASSUME_NONNULL_BEGIN endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeIdentifyTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeIdentifyTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -185,130 +204,146 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params - completionHandler: - (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params - completionHandler: - (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params - completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params - completionHandler: - (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)removeAllGroupsWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)removeAllGroupsWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -326,229 +361,259 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params - completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completionHandler:(StatusCompletion)completionHandler; + completion:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params - completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params - completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params - completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSceneCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSceneValidWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLastConfiguredByWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -565,204 +630,239 @@ NS_ASSUME_NONNULL_BEGIN endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; -- (void)offWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; -- (void)onWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; -- (void)toggleWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)offWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)onWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)toggleWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)onWithRecallGlobalSceneWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)onWithRecallGlobalSceneWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOnTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -779,135 +879,155 @@ NS_ASSUME_NONNULL_BEGIN endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -925,386 +1045,444 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOptionsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOnLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeStartUpCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -1321,276 +1499,319 @@ NS_ASSUME_NONNULL_BEGIN endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveTextWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInactiveTextWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePolarityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePresentValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeReliabilityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -1608,160 +1829,190 @@ NS_ASSUME_NONNULL_BEGIN endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeDeviceListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDeviceListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeDeviceTypeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeDeviceTypeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeServerListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClientListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePartsListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -1779,115 +2030,133 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -1908,192 +2177,223 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTargetsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAccessControlEntriesPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2111,165 +2411,194 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeActionListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeEndpointListsWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSetupURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2289,458 +2618,533 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)mfgSpecificPingWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)mfgSpecificPingWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeProductNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeProductIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLocationWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLocationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePartNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeProductURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeReachableWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2758,104 +3162,117 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params - completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params - completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -2873,176 +3290,200 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -3062,136 +3503,155 @@ NS_ASSUME_NONNULL_BEGIN endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -3211,158 +3671,180 @@ NS_ASSUME_NONNULL_BEGIN endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeHourFormatWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -3382,118 +3864,135 @@ NS_ASSUME_NONNULL_BEGIN endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -3510,111 +4009,129 @@ NS_ASSUME_NONNULL_BEGIN endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -3632,656 +4149,756 @@ NS_ASSUME_NONNULL_BEGIN endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatVoltageWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatPresentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveBatFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatCapacityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatQuantityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBatChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveBatChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4299,206 +4916,236 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params - completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params - completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params - completionHandler: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)commissioningCompleteWithCompletionHandler: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; - -- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + completion: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)commissioningCompleteWithCompletion:(void (^)( + MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + +- (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBasicCommissioningInfoWithCompletionHandler: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBasicCommissioningInfoWithCompletion: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void) - subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)( + MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))completionHandler; + completion: + (void (^)( + MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4516,261 +5163,298 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNetworksWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4788,99 +5472,112 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params - completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -4899,259 +5596,298 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRebootCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBootReasonsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5170,172 +5906,197 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)resetWatermarksWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)resetWatermarksWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -5354,1240 +6115,1433 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeChannelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRoutingRoleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNetworkNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeExtendedPanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNeighborTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRouteTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRouteTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePartitionIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeWeightingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDataVersionWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxTotalCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxDataCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxDataCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxErrSecCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSecurityPolicyWithCompletionHandler: - (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeChannelPage0MaskWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationalDatasetComponentsWithCompletionHandler: +- (void)readAttributeOperationalDatasetComponentsWithCompletion: (void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))completionHandler; + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. - (void) - subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))reportHandler; + NewsubscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void) readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))completionHandler; + completion: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -6606,330 +7560,380 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBssidWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeWiFiVersionWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeChannelNumberWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRssiWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBeaconRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -6948,257 +7952,297 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePHYRateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -7218,360 +8262,418 @@ NS_ASSUME_NONNULL_BEGIN endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeProductNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePartNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeProductURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeReachableWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -7593,150 +8695,172 @@ light or a window shade. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -7754,157 +8878,178 @@ light or a window shade. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)revokeCommissioningWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)revokeCommissioningWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -7923,225 +9068,258 @@ light or a window shade. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -8159,180 +9337,207 @@ light or a window shade. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -8350,112 +9555,129 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeLabelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -8472,116 +9694,133 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeLabelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -8598,113 +9837,129 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeStateValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -8722,208 +9977,242 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -8941,873 +10230,1006 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params - completionHandler: - (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completionHandler:(StatusCompletion)completionHandler; + completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params - completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeLockStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLockTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDoorStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLanguageWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperatingModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -9825,523 +11247,602 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)upOrOpenWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)upOrOpenWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)downOrCloseWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)downOrCloseWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)stopMotionWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)stopMotionWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeConfigStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -10359,311 +11860,356 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)barrierControlStopWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -10680,517 +12226,600 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePumpStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCapacityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeControlModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -11208,1129 +12837,1293 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params - completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)clearWeeklyScheduleWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; ++ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSystemModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeThermostatRunningStateWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeACCapacityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -12347,310 +14140,361 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeFanModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRockSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRockSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeWindSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeWindSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -12667,166 +14511,188 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -12843,1097 +14709,1286 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOptionsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary1XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary1YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary2XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary2YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary3XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary3YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary4XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary4YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary5XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary5YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary6XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary6YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -13950,388 +16005,447 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBallastStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeIntrinsicBalanceFactorWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeLampQuantityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLampTypeWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLampManufacturerWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLampRatedHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLampBurnHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLampAlarmModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -14348,184 +16462,213 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -14542,166 +16685,192 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -14718,252 +16887,295 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -14980,166 +17192,192 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -15156,166 +17394,192 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -15332,370 +17596,426 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -15712,113 +18032,129 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeMACAddressWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -15836,155 +18172,177 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params - completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeChannelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLineupWithCompletionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLineupWithCompletion:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -16002,133 +18360,153 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params - completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTargetListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -16147,267 +18525,301 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)playWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)playWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)pauseWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)pauseWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)stopPlaybackWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)stopPlaybackWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)startOverWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)startOverWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)previousWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)previousWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)nextWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)nextWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)rewindWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)fastForwardWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeStartTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDurationWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -16424,139 +18836,160 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)showInputStatusWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)showInputStatusWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)hideInputStatusWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)hideInputStatusWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeInputListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -16573,99 +19006,113 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; -- (void)sleepWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)sleepWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -16683,99 +19130,112 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - completionHandler: - (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -16793,143 +19253,162 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params - completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params - completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -16947,134 +19426,154 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeOutputListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -17092,145 +19591,163 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeCatalogListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -17248,234 +19765,274 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeProductIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeApplicationWithCompletionHandler: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))completionHandler; + completion: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -17495,103 +20052,116 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params - completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHandler:(StatusCompletion)completionHandler; + completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)logoutWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)logoutWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -17610,2502 +20180,2882 @@ labels. queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)getProfileInfoCommandWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)getProfileInfoCommandWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcVoltageWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcPowerWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePowerDivisorWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActivePowerWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributePowerFactorWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: (MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -20122,1927 +23072,2259 @@ labels. endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; -- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; -- (void)testWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)testWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)testNotHandledWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)testNotHandledWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params - completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testSpecificWithCompletionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)testSpecificWithCompletion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)testUnknownCommandWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)testUnknownCommandWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params - completionHandler: - (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testListNestedStructListArgumentRequestWithParams: (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params - completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params - completionHandler: - (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion: + (void (^)( + MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)timedInvokeRequestWithCompletionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; +- (void)timedInvokeRequestWithCompletion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params - completionHandler: - (void (^)( - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; - -- (void)readAttributeBooleanWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + completion:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void) + testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + completion: + (void (^)( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + +- (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBitmap8WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBitmap16WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBitmap32WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeBitmap64WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFloatSingleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFloatDoubleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeOctetStringWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeListInt8uWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeListOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeListStructOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeLongOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLongOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeCharStringWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeLongCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLongCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeEpochUsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeEpochUsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeEpochSWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeEpochSWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeVendorIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeListNullablesAndOptionalsStructWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeEnumAttrWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeStructAttrWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeStructAttrWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeListLongOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeListLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeListFabricScopedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeTimedWriteBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeTimedWriteBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeTimedWriteBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneralErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeGeneralErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneralErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeClusterErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeUnsupportedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeUnsupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeUnsupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableBitmap16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableBitmap32WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableBitmap64WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableFloatSingleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNullableFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableFloatDoubleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNullableFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableEnumAttrWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableStructWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNullableStructWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNullableRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNullableRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNullableRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeWriteOnlyInt8uWithCompletionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler - API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); +- (void)readAttributeWriteOnlyInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler - API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler - API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeWriteOnlyInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeWriteOnlyInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeWriteOnlyInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler - API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void) + NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_AVAILABLE; + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; /** * This API does not support setting autoResubscribe to NO in the * MTRSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; +// TODO: The "New" bit is a hack for now until the selector changes when we move min/maxInterval into the params. Then we can +// remove the "New" bit. +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -23503,518 +26785,21140 @@ typedef NS_ENUM(uint8_t, MTRFaultInjectionFaultType) { endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end - -@interface MTRBaseClusterGroups (Deprecated) +- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use identifyWithParams:completion:"); +- (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use triggerEffectWithParams:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeIdentifyTimeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeIdentifyTimeWithCompletion:"); +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeIdentifyTimeWithValue:completion:"); +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeIdentifyTimeWithValue:params:completion:"); +- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeIdentifyTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeIdentifyTimeWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeIdentifyTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeIdentifyTypeWithCompletion:"); +- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeIdentifyTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeIdentifyTypeWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterScenes (Deprecated) +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterOnOff (Deprecated) +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterOnOffSwitchConfiguration (Deprecated) +@interface MTRBaseClusterGroups (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end - -@interface MTRBaseClusterLevelControl (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); - -@end - -@interface MTRBaseClusterBinaryInputBasic (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params + completionHandler: + (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use addGroupWithParams:completion:"); +- (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params + completionHandler: + (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use viewGroupWithParams:completion:"); +- (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params + completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getGroupMembershipWithParams:completion:"); +- (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params + completionHandler: + (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use removeGroupWithParams:completion:"); +- (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use removeAllGroupsWithParams:completion:"); +- (void)removeAllGroupsWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use removeAllGroupsWithCompletion:"); +- (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use addGroupIfIdentifyingWithParams:completion:"); -@end +- (void)readAttributeNameSupportWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNameSupportWithCompletion:"); +- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNameSupportWithParams:subscriptionEstablished:"); ++ (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNameSupportWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterDescriptor (Deprecated) +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterBinding (Deprecated) +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterAccessControl (Deprecated) +@interface MTRBaseClusterScenes (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end +- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use addSceneWithParams:completion:"); +- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use viewSceneWithParams:completion:"); +- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use removeSceneWithParams:completion:"); +- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params + completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use removeAllScenesWithParams:completion:"); +- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use storeSceneWithParams:completion:"); +- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use recallSceneWithParams:completion:"); +- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params + completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getSceneMembershipWithParams:completion:"); +- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params + completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedAddSceneWithParams:completion:"); +- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params + completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedViewSceneWithParams:completion:"); +- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use copySceneWithParams:completion:"); -@interface MTRBaseClusterActions (Deprecated) +- (void)readAttributeSceneCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSceneCountWithCompletion:"); +- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSceneCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSceneCountWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeCurrentSceneWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentSceneWithCompletion:"); +- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentSceneWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentSceneWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeCurrentGroupWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentGroupWithCompletion:"); +- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentGroupWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentGroupWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterBasic (Deprecated) +- (void)readAttributeSceneValidWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSceneValidWithCompletion:"); +- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSceneValidWithParams:subscriptionEstablished:"); ++ (void)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSceneValidWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeNameSupportWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNameSupportWithCompletion:"); +- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNameSupportWithParams:subscriptionEstablished:"); ++ (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNameSupportWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeLastConfiguredByWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLastConfiguredByWithCompletion:"); +- (void) + subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLastConfiguredByWithParams:subscriptionEstablished:"); ++ (void)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLastConfiguredByWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterOtaSoftwareUpdateProvider (Deprecated) +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterOtaSoftwareUpdateRequestor (Deprecated) +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterLocalizationConfiguration (Deprecated) +@interface MTRBaseClusterOnOff (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end +- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use offWithParams:completion:"); +- (void)offWithCompletionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use offWithCompletion:"); +- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use onWithParams:completion:"); +- (void)onWithCompletionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use onWithCompletion:"); +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use toggleWithParams:completion:"); +- (void)toggleWithCompletionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use toggleWithCompletion:"); +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use offWithEffectWithParams:completion:"); +- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use onWithRecallGlobalSceneWithParams:completion:"); +- (void)onWithRecallGlobalSceneWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use onWithRecallGlobalSceneWithCompletion:"); +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use onWithTimedOffWithParams:completion:"); -@interface MTRBaseClusterTimeFormatLocalization (Deprecated) +- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnOffWithCompletion:"); +- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOnOffWithParams:subscriptionEstablished:"); ++ (void)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnOffWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeGlobalSceneControlWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGlobalSceneControlWithCompletion:"); +- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGlobalSceneControlWithParams:subscriptionEstablished:"); ++ (void)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGlobalSceneControlWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnTimeWithCompletion:"); +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOnTimeWithValue:completion:"); +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOnTimeWithValue:params:completion:"); +- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOnTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnTimeWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterUnitLocalization (Deprecated) +- (void)readAttributeOffWaitTimeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOffWaitTimeWithCompletion:"); +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOffWaitTimeWithValue:completion:"); +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOffWaitTimeWithValue:params:completion:"); +- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOffWaitTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOffWaitTimeWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); - -@end +- (void)readAttributeStartUpOnOffWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartUpOnOffWithCompletion:"); +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeStartUpOnOffWithValue:completion:"); +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeStartUpOnOffWithValue:params:completion:"); +- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStartUpOnOffWithParams:subscriptionEstablished:"); ++ (void)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartUpOnOffWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterPowerSourceConfiguration (Deprecated) +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterPowerSource (Deprecated) +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterGeneralCommissioning (Deprecated) +@interface MTRBaseClusterOnOffSwitchConfiguration (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end - -@interface MTRBaseClusterNetworkCommissioning (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeSwitchTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSwitchTypeWithCompletion:"); +- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSwitchTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSwitchTypeWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeSwitchActionsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSwitchActionsWithCompletion:"); +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSwitchActionsWithValue:completion:"); +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSwitchActionsWithValue:params:completion:"); +- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSwitchActionsWithParams:subscriptionEstablished:"); ++ (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSwitchActionsWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterDiagnosticLogs (Deprecated) +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterGeneralDiagnostics (Deprecated) +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterSoftwareDiagnostics (Deprecated) +@interface MTRBaseClusterLevelControl (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end +- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToLevelWithParams:completion:"); +- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use moveWithParams:completion:"); +- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use stepWithParams:completion:"); +- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use stopWithParams:completion:"); +- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToLevelWithOnOffWithParams:completion:"); +- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveWithOnOffWithParams:completion:"); +- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stepWithOnOffWithParams:completion:"); +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stopWithOnOffWithParams:completion:"); +- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToClosestFrequencyWithParams:completion:"); -@interface MTRBaseClusterThreadNetworkDiagnostics (Deprecated) +- (void)readAttributeCurrentLevelWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentLevelWithCompletion:"); +- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentLevelWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentLevelWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeRemainingTimeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRemainingTimeWithCompletion:"); +- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRemainingTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRemainingTimeWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeMinLevelWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinLevelWithCompletion:"); +- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinLevelWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinLevelWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterWiFiNetworkDiagnostics (Deprecated) +- (void)readAttributeMaxLevelWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxLevelWithCompletion:"); +- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxLevelWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxLevelWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeCurrentFrequencyWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentFrequencyWithCompletion:"); +- (void) + subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentFrequencyWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentFrequencyWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeMinFrequencyWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinFrequencyWithCompletion:"); +- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinFrequencyWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinFrequencyWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterEthernetNetworkDiagnostics (Deprecated) +- (void)readAttributeMaxFrequencyWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxFrequencyWithCompletion:"); +- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxFrequencyWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxFrequencyWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOptionsWithCompletion:"); +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOptionsWithValue:completion:"); +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOptionsWithValue:params:completion:"); +- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOptionsWithParams:subscriptionEstablished:"); ++ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOptionsWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeOnOffTransitionTimeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnOffTransitionTimeWithCompletion:"); +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOnOffTransitionTimeWithValue:completion:"); +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOnOffTransitionTimeWithValue:params:completion:"); +- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOnOffTransitionTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnOffTransitionTimeWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterBridgedDeviceBasic (Deprecated) +- (void)readAttributeOnLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnLevelWithCompletion:"); +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOnLevelWithValue:completion:"); +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOnLevelWithValue:params:completion:"); +- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOnLevelWithParams:subscriptionEstablished:"); ++ (void)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnLevelWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeOnTransitionTimeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnTransitionTimeWithCompletion:"); +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOnTransitionTimeWithValue:completion:"); +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOnTransitionTimeWithValue:params:completion:"); +- (void) + subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOnTransitionTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnTransitionTimeWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeOffTransitionTimeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOffTransitionTimeWithCompletion:"); +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOffTransitionTimeWithValue:completion:"); +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOffTransitionTimeWithValue:params:completion:"); +- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOffTransitionTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOffTransitionTimeWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterSwitch (Deprecated) +- (void)readAttributeDefaultMoveRateWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDefaultMoveRateWithCompletion:"); +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeDefaultMoveRateWithValue:completion:"); +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeDefaultMoveRateWithValue:params:completion:"); +- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDefaultMoveRateWithParams:subscriptionEstablished:"); ++ (void)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDefaultMoveRateWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeStartUpCurrentLevelWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartUpCurrentLevelWithCompletion:"); +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeStartUpCurrentLevelWithValue:completion:"); +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeStartUpCurrentLevelWithValue:params:completion:"); +- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStartUpCurrentLevelWithParams:subscriptionEstablished:"); ++ (void)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartUpCurrentLevelWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterAdministratorCommissioning (Deprecated) +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterOperationalCredentials (Deprecated) +@interface MTRBaseClusterBinaryInputBasic (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end +- (void)readAttributeActiveTextWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveTextWithCompletion:"); +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeActiveTextWithValue:completion:"); +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeActiveTextWithValue:params:completion:"); +- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveTextWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveTextWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterGroupKeyManagement (Deprecated) +- (void)readAttributeDescriptionWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDescriptionWithCompletion:"); +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeDescriptionWithValue:completion:"); +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeDescriptionWithValue:params:completion:"); +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDescriptionWithParams:subscriptionEstablished:"); ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDescriptionWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeInactiveTextWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInactiveTextWithCompletion:"); +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInactiveTextWithValue:completion:"); +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInactiveTextWithValue:params:completion:"); +- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInactiveTextWithParams:subscriptionEstablished:"); ++ (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInactiveTextWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeOutOfServiceWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOutOfServiceWithCompletion:"); +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOutOfServiceWithValue:completion:"); +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOutOfServiceWithValue:params:completion:"); +- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOutOfServiceWithParams:subscriptionEstablished:"); ++ (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOutOfServiceWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterFixedLabel (Deprecated) +- (void)readAttributePolarityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePolarityWithCompletion:"); +- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePolarityWithParams:subscriptionEstablished:"); ++ (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePolarityWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributePresentValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePresentValueWithCompletion:"); +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePresentValueWithValue:completion:"); +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePresentValueWithValue:params:completion:"); +- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePresentValueWithParams:subscriptionEstablished:"); ++ (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePresentValueWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeReliabilityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReliabilityWithCompletion:"); +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeReliabilityWithValue:completion:"); +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeReliabilityWithValue:params:completion:"); +- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeReliabilityWithParams:subscriptionEstablished:"); ++ (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReliabilityWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterUserLabel (Deprecated) +- (void)readAttributeStatusFlagsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStatusFlagsWithCompletion:"); +- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStatusFlagsWithParams:subscriptionEstablished:"); ++ (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStatusFlagsWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeApplicationTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApplicationTypeWithCompletion:"); +- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeApplicationTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApplicationTypeWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterBooleanState (Deprecated) +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterModeSelect (Deprecated) +@interface MTRBaseClusterDescriptor (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end +- (void)readAttributeDeviceListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDeviceListWithCompletion:"); +- (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDeviceListWithParams:subscriptionEstablished:"); ++ (void)readAttributeDeviceListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDeviceListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterDoorLock (Deprecated) +- (void)readAttributeServerListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeServerListWithCompletion:"); +- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeServerListWithParams:subscriptionEstablished:"); ++ (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeServerListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeClientListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClientListWithCompletion:"); +- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClientListWithParams:subscriptionEstablished:"); ++ (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClientListWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributePartsListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePartsListWithCompletion:"); +- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePartsListWithParams:subscriptionEstablished:"); ++ (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePartsListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterWindowCovering (Deprecated) +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterBarrierControl (Deprecated) +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterPumpConfigurationAndControl (Deprecated) +@interface MTRBaseClusterBinding (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end +- (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBindingWithParams:completion:"); +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBindingWithValue:completion:"); +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBindingWithValue:params:completion:"); +- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBindingWithParams:subscriptionEstablished:"); ++ (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBindingWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterThermostat (Deprecated) +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterFanControl (Deprecated) +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterThermostatUserInterfaceConfiguration (Deprecated) +@interface MTRBaseClusterAccessControl (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end +- (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAclWithParams:completion:"); +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeAclWithValue:completion:"); +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeAclWithValue:params:completion:"); +- (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAclWithParams:subscriptionEstablished:"); ++ (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAclWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterColorControl (Deprecated) +- (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeExtensionWithParams:completion:"); +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeExtensionWithValue:completion:"); +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeExtensionWithValue:params:completion:"); +- (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeExtensionWithParams:subscriptionEstablished:"); ++ (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeExtensionWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeSubjectsPerAccessControlEntryWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSubjectsPerAccessControlEntryWithCompletion:"); +- (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSubjectsPerAccessControlEntryWithParams:subscriptionEstablished:"); ++ (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSubjectsPerAccessControlEntryWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeTargetsPerAccessControlEntryWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTargetsPerAccessControlEntryWithCompletion:"); +- (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTargetsPerAccessControlEntryWithParams:subscriptionEstablished:"); ++ (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTargetsPerAccessControlEntryWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterBallastConfiguration (Deprecated) +- (void)readAttributeAccessControlEntriesPerFabricWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAccessControlEntriesPerFabricWithCompletion:"); +- (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAccessControlEntriesPerFabricWithParams:subscriptionEstablished:"); ++ (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAccessControlEntriesPerFabricWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterIlluminanceMeasurement (Deprecated) +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterTemperatureMeasurement (Deprecated) +@interface MTRBaseClusterActions (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end - -@interface MTRBaseClusterPressureMeasurement (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); - -@end - -@interface MTRBaseClusterFlowMeasurement (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); - -@end +- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use instantActionWithParams:completion:"); +- (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use instantActionWithTransitionWithParams:completion:"); +- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use startActionWithParams:completion:"); +- (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use startActionWithDurationWithParams:completion:"); +- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stopActionWithParams:completion:"); +- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use pauseActionWithParams:completion:"); +- (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use pauseActionWithDurationWithParams:completion:"); +- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resumeActionWithParams:completion:"); +- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enableActionWithParams:completion:"); +- (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enableActionWithDurationWithParams:completion:"); +- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use disableActionWithParams:completion:"); +- (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use disableActionWithDurationWithParams:completion:"); -@interface MTRBaseClusterRelativeHumidityMeasurement (Deprecated) +- (void)readAttributeActionListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActionListWithCompletion:"); +- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActionListWithParams:subscriptionEstablished:"); ++ (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActionListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeEndpointListsWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEndpointListsWithCompletion:"); +- (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEndpointListsWithParams:subscriptionEstablished:"); ++ (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEndpointListsWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeSetupURLWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSetupURLWithCompletion:"); +- (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSetupURLWithParams:subscriptionEstablished:"); ++ (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSetupURLWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterOccupancySensing (Deprecated) +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterWakeOnLan (Deprecated) +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterChannel (Deprecated) +@interface MTRBaseClusterBasic (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); -@end - -@interface MTRBaseClusterTargetNavigator (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use mfgSpecificPingWithParams:completion:"); +- (void)mfgSpecificPingWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use mfgSpecificPingWithCompletion:"); -@end +- (void)readAttributeDataModelRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDataModelRevisionWithCompletion:"); +- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDataModelRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDataModelRevisionWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterMediaPlayback (Deprecated) +- (void)readAttributeVendorNameWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorNameWithCompletion:"); +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeVendorNameWithParams:subscriptionEstablished:"); ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorNameWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeVendorIDWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorIDWithCompletion:"); +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeVendorIDWithParams:subscriptionEstablished:"); ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorIDWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeProductNameWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductNameWithCompletion:"); +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeProductNameWithParams:subscriptionEstablished:"); ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductNameWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterMediaInput (Deprecated) +- (void)readAttributeProductIDWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductIDWithCompletion:"); +- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeProductIDWithParams:subscriptionEstablished:"); ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductIDWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeNodeLabelWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNodeLabelWithCompletion:"); +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNodeLabelWithValue:completion:"); +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNodeLabelWithValue:params:completion:"); +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNodeLabelWithParams:subscriptionEstablished:"); ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNodeLabelWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeLocationWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocationWithCompletion:"); +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLocationWithValue:completion:"); +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLocationWithValue:params:completion:"); +- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLocationWithParams:subscriptionEstablished:"); ++ (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocationWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterLowPower (Deprecated) +- (void)readAttributeHardwareVersionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHardwareVersionWithCompletion:"); +- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeHardwareVersionWithParams:subscriptionEstablished:"); ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHardwareVersionWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeHardwareVersionStringWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHardwareVersionStringWithCompletion:"); +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeHardwareVersionStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHardwareVersionStringWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeSoftwareVersionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSoftwareVersionWithCompletion:"); +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSoftwareVersionWithParams:subscriptionEstablished:"); ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSoftwareVersionWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterKeypadInput (Deprecated) +- (void)readAttributeSoftwareVersionStringWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSoftwareVersionStringWithCompletion:"); +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSoftwareVersionStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSoftwareVersionStringWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeManufacturingDateWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeManufacturingDateWithCompletion:"); +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeManufacturingDateWithParams:subscriptionEstablished:"); ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeManufacturingDateWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributePartNumberWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePartNumberWithCompletion:"); +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePartNumberWithParams:subscriptionEstablished:"); ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePartNumberWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterContentLauncher (Deprecated) +- (void)readAttributeProductURLWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductURLWithCompletion:"); +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeProductURLWithParams:subscriptionEstablished:"); ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductURLWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeProductLabelWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductLabelWithCompletion:"); +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeProductLabelWithParams:subscriptionEstablished:"); ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductLabelWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeSerialNumberWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSerialNumberWithCompletion:"); +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSerialNumberWithParams:subscriptionEstablished:"); ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSerialNumberWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterAudioOutput (Deprecated) +- (void)readAttributeLocalConfigDisabledWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocalConfigDisabledWithCompletion:"); +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLocalConfigDisabledWithValue:completion:"); +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLocalConfigDisabledWithValue:params:completion:"); +- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLocalConfigDisabledWithParams:subscriptionEstablished:"); ++ (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocalConfigDisabledWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeReachableWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReachableWithCompletion:"); +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeReachableWithParams:subscriptionEstablished:"); ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReachableWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeUniqueIDWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUniqueIDWithCompletion:"); +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUniqueIDWithParams:subscriptionEstablished:"); ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUniqueIDWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterApplicationLauncher (Deprecated) +- (void)readAttributeCapabilityMinimaWithCompletionHandler: + (void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCapabilityMinimaWithCompletion:"); +- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCapabilityMinimaWithParams:subscriptionEstablished:"); ++ (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCapabilityMinimaWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); -@end +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); -@interface MTRBaseClusterApplicationBasic (Deprecated) +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); @end -@interface MTRBaseClusterAccountLogin (Deprecated) +@interface MTRBaseClusterOtaSoftwareUpdateProvider (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use queryImageWithParams:completion:"); +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use applyUpdateRequestWithParams:completion:"); +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use notifyUpdateAppliedWithParams:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + @end -@interface MTRBaseClusterElectricalMeasurement (Deprecated) +@interface MTRBaseClusterOtaSoftwareUpdateRequestor (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use announceOtaProviderWithParams:completion:"); + +- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDefaultOtaProvidersWithParams:completion:"); +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeDefaultOtaProvidersWithValue:completion:"); +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeDefaultOtaProvidersWithValue:params:completion:"); +- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDefaultOtaProvidersWithParams:subscriptionEstablished:"); ++ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDefaultOtaProvidersWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUpdatePossibleWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUpdatePossibleWithCompletion:"); +- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUpdatePossibleWithParams:subscriptionEstablished:"); ++ (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUpdatePossibleWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUpdateStateWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUpdateStateWithCompletion:"); +- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUpdateStateWithParams:subscriptionEstablished:"); ++ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUpdateStateWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUpdateStateProgressWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUpdateStateProgressWithCompletion:"); +- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUpdateStateProgressWithParams:subscriptionEstablished:"); ++ (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUpdateStateProgressWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + @end -@interface MTRBaseClusterTestCluster (Deprecated) +@interface MTRBaseClusterLocalizationConfiguration (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); +- (void)readAttributeActiveLocaleWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveLocaleWithCompletion:"); +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeActiveLocaleWithValue:completion:"); +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeActiveLocaleWithValue:params:completion:"); +- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveLocaleWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveLocaleWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSupportedLocalesWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedLocalesWithCompletion:"); +- (void) + subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSupportedLocalesWithParams:subscriptionEstablished:"); ++ (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedLocalesWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterTimeFormatLocalization (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeHourFormatWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHourFormatWithCompletion:"); +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeHourFormatWithValue:completion:"); +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeHourFormatWithValue:params:completion:"); +- (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeHourFormatWithParams:subscriptionEstablished:"); ++ (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHourFormatWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActiveCalendarTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveCalendarTypeWithCompletion:"); +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeActiveCalendarTypeWithValue:completion:"); +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeActiveCalendarTypeWithValue:params:completion:"); +- (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveCalendarTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveCalendarTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSupportedCalendarTypesWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedCalendarTypesWithCompletion:"); +- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSupportedCalendarTypesWithParams:subscriptionEstablished:"); ++ (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedCalendarTypesWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterUnitLocalization (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeTemperatureUnitWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTemperatureUnitWithCompletion:"); +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeTemperatureUnitWithValue:completion:"); +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeTemperatureUnitWithValue:params:completion:"); +- (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTemperatureUnitWithParams:subscriptionEstablished:"); ++ (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTemperatureUnitWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterPowerSourceConfiguration (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSourcesWithCompletion:"); +- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSourcesWithParams:subscriptionEstablished:"); ++ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSourcesWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterPowerSource (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStatusWithCompletion:"); +- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStatusWithParams:subscriptionEstablished:"); ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStatusWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOrderWithCompletion:"); +- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOrderWithParams:subscriptionEstablished:"); ++ (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOrderWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDescriptionWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDescriptionWithCompletion:"); +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDescriptionWithParams:subscriptionEstablished:"); ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDescriptionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredAssessedInputVoltageWithCompletion:"); +- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWiredAssessedInputVoltageWithParams:subscriptionEstablished:"); ++ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredAssessedInputVoltageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredAssessedInputFrequencyWithCompletion:"); +- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWiredAssessedInputFrequencyWithParams:subscriptionEstablished:"); ++ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredAssessedInputFrequencyWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWiredCurrentTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredCurrentTypeWithCompletion:"); +- (void) + subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWiredCurrentTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredCurrentTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWiredAssessedCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredAssessedCurrentWithCompletion:"); +- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWiredAssessedCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredAssessedCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWiredNominalVoltageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredNominalVoltageWithCompletion:"); +- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWiredNominalVoltageWithParams:subscriptionEstablished:"); ++ (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredNominalVoltageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWiredMaximumCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredMaximumCurrentWithCompletion:"); +- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWiredMaximumCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredMaximumCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWiredPresentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredPresentWithCompletion:"); +- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWiredPresentWithParams:subscriptionEstablished:"); ++ (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiredPresentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActiveWiredFaultsWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveWiredFaultsWithCompletion:"); +- (void) + subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveWiredFaultsWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveWiredFaultsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatVoltageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatVoltageWithCompletion:"); +- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatVoltageWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatVoltageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatPercentRemainingWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatPercentRemainingWithCompletion:"); +- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatPercentRemainingWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatPercentRemainingWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatTimeRemainingWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatTimeRemainingWithCompletion:"); +- (void) + subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatTimeRemainingWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatTimeRemainingWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatChargeLevelWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatChargeLevelWithCompletion:"); +- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatChargeLevelWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatChargeLevelWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatReplacementNeededWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatReplacementNeededWithCompletion:"); +- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatReplacementNeededWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatReplacementNeededWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatReplaceabilityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatReplaceabilityWithCompletion:"); +- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatReplaceabilityWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatReplaceabilityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatPresentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatPresentWithCompletion:"); +- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatPresentWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatPresentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActiveBatFaultsWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveBatFaultsWithCompletion:"); +- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveBatFaultsWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveBatFaultsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatReplacementDescriptionWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatReplacementDescriptionWithCompletion:"); +- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatReplacementDescriptionWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatReplacementDescriptionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatCommonDesignationWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatCommonDesignationWithCompletion:"); +- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatCommonDesignationWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatCommonDesignationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatANSIDesignationWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatANSIDesignationWithCompletion:"); +- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatANSIDesignationWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatANSIDesignationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatIECDesignationWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatIECDesignationWithCompletion:"); +- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatIECDesignationWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatIECDesignationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatApprovedChemistryWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatApprovedChemistryWithCompletion:"); +- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatApprovedChemistryWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatApprovedChemistryWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatCapacityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatCapacityWithCompletion:"); +- (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatCapacityWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatCapacityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatQuantityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatQuantityWithCompletion:"); +- (void)subscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatQuantityWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatQuantityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatChargeStateWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatChargeStateWithCompletion:"); +- (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatChargeStateWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatChargeStateWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatTimeToFullChargeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatTimeToFullChargeWithCompletion:"); +- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatTimeToFullChargeWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatTimeToFullChargeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatFunctionalWhileChargingWithCompletion:"); +- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatFunctionalWhileChargingWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatFunctionalWhileChargingWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBatChargingCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatChargingCurrentWithCompletion:"); +- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBatChargingCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBatChargingCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActiveBatChargeFaultsWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveBatChargeFaultsWithCompletion:"); +- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveBatChargeFaultsWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveBatChargeFaultsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterGeneralCommissioning (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params + completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use armFailSafeWithParams:completion:"); +- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params + completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use setRegulatoryConfigWithParams:completion:"); +- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use commissioningCompleteWithParams:completion:"); +- (void)commissioningCompleteWithCompletionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler MTR_NEWLY_DEPRECATED("Please use commissioningCompleteWithCompletion:"); + +- (void)readAttributeBreadcrumbWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBreadcrumbWithCompletion:"); +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBreadcrumbWithValue:completion:"); +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBreadcrumbWithValue:params:completion:"); +- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBreadcrumbWithParams:subscriptionEstablished:"); ++ (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBreadcrumbWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBasicCommissioningInfoWithCompletionHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBasicCommissioningInfoWithCompletion:"); +- (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)( + MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBasicCommissioningInfoWithParams:subscriptionEstablished:"); ++ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBasicCommissioningInfoWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRegulatoryConfigWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRegulatoryConfigWithCompletion:"); +- (void) + subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRegulatoryConfigWithParams:subscriptionEstablished:"); ++ (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRegulatoryConfigWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLocationCapabilityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocationCapabilityWithCompletion:"); +- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLocationCapabilityWithParams:subscriptionEstablished:"); ++ (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocationCapabilityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportsConcurrentConnectionWithCompletion:"); +- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSupportsConcurrentConnectionWithParams:subscriptionEstablished:"); ++ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportsConcurrentConnectionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterNetworkCommissioning (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use scanNetworksWithParams:completion:"); +- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use addOrUpdateWiFiNetworkWithParams:completion:"); +- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use addOrUpdateThreadNetworkWithParams:completion:"); +- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use removeNetworkWithParams:completion:"); +- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use connectNetworkWithParams:completion:"); +- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use reorderNetworkWithParams:completion:"); + +- (void)readAttributeMaxNetworksWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxNetworksWithCompletion:"); +- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxNetworksWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxNetworksWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNetworksWithCompletion:"); +- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNetworksWithParams:subscriptionEstablished:"); ++ (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNetworksWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeScanMaxTimeSecondsWithCompletion:"); +- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeScanMaxTimeSecondsWithParams:subscriptionEstablished:"); ++ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeScanMaxTimeSecondsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeConnectMaxTimeSecondsWithCompletion:"); +- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeConnectMaxTimeSecondsWithParams:subscriptionEstablished:"); ++ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeConnectMaxTimeSecondsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInterfaceEnabledWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInterfaceEnabledWithCompletion:"); +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInterfaceEnabledWithValue:completion:"); +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInterfaceEnabledWithValue:params:completion:"); +- (void) + subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInterfaceEnabledWithParams:subscriptionEstablished:"); ++ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInterfaceEnabledWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLastNetworkingStatusWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLastNetworkingStatusWithCompletion:"); +- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLastNetworkingStatusWithParams:subscriptionEstablished:"); ++ (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLastNetworkingStatusWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLastNetworkIDWithCompletionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLastNetworkIDWithCompletion:"); +- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLastNetworkIDWithParams:subscriptionEstablished:"); ++ (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLastNetworkIDWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLastConnectErrorValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLastConnectErrorValueWithCompletion:"); +- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLastConnectErrorValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLastConnectErrorValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterDiagnosticLogs (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params + completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use retrieveLogsRequestWithParams:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterGeneralDiagnostics (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testEventTriggerWithParams:completion:"); + +- (void)readAttributeNetworkInterfacesWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNetworkInterfacesWithCompletion:"); +- (void) + subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNetworkInterfacesWithParams:subscriptionEstablished:"); ++ (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNetworkInterfacesWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRebootCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRebootCountWithCompletion:"); +- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRebootCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRebootCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUpTimeWithCompletion:"); +- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUpTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUpTimeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTotalOperationalHoursWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTotalOperationalHoursWithCompletion:"); +- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTotalOperationalHoursWithParams:subscriptionEstablished:"); ++ (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTotalOperationalHoursWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBootReasonsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBootReasonsWithCompletion:"); +- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBootReasonsWithParams:subscriptionEstablished:"); ++ (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBootReasonsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActiveHardwareFaultsWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveHardwareFaultsWithCompletion:"); +- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveHardwareFaultsWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveHardwareFaultsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActiveRadioFaultsWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveRadioFaultsWithCompletion:"); +- (void) + subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveRadioFaultsWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveRadioFaultsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActiveNetworkFaultsWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveNetworkFaultsWithCompletion:"); +- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveNetworkFaultsWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveNetworkFaultsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTestEventTriggersEnabledWithCompletion:"); +- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTestEventTriggersEnabledWithParams:subscriptionEstablished:"); ++ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTestEventTriggersEnabledWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterSoftwareDiagnostics (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetWatermarksWithParams:completion:"); +- (void)resetWatermarksWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetWatermarksWithCompletion:"); + +- (void)readAttributeThreadMetricsWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeThreadMetricsWithCompletion:"); +- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeThreadMetricsWithParams:subscriptionEstablished:"); ++ (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeThreadMetricsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentHeapFreeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentHeapFreeWithCompletion:"); +- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentHeapFreeWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentHeapFreeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentHeapUsedWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentHeapUsedWithCompletion:"); +- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentHeapUsedWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentHeapUsedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentHeapHighWatermarkWithCompletion:"); +- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentHeapHighWatermarkWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentHeapHighWatermarkWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterThreadNetworkDiagnostics (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithParams:completion:"); +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithCompletion:"); + +- (void)readAttributeChannelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeChannelWithCompletion:"); +- (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeChannelWithParams:subscriptionEstablished:"); ++ (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeChannelWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRoutingRoleWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRoutingRoleWithCompletion:"); +- (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRoutingRoleWithParams:subscriptionEstablished:"); ++ (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRoutingRoleWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNetworkNameWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNetworkNameWithCompletion:"); +- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNetworkNameWithParams:subscriptionEstablished:"); ++ (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNetworkNameWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePanIdWithCompletion:"); +- (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePanIdWithParams:subscriptionEstablished:"); ++ (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePanIdWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeExtendedPanIdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeExtendedPanIdWithCompletion:"); +- (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeExtendedPanIdWithParams:subscriptionEstablished:"); ++ (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeExtendedPanIdWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeshLocalPrefixWithCompletionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeshLocalPrefixWithCompletion:"); +- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeshLocalPrefixWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeshLocalPrefixWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOverrunCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOverrunCountWithCompletion:"); +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOverrunCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOverrunCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNeighborTableListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNeighborTableListWithCompletion:"); +- (void) + subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNeighborTableListWithParams:subscriptionEstablished:"); ++ (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNeighborTableListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRouteTableListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRouteTableListWithCompletion:"); +- (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRouteTableListWithParams:subscriptionEstablished:"); ++ (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRouteTableListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePartitionIdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePartitionIdWithCompletion:"); +- (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePartitionIdWithParams:subscriptionEstablished:"); ++ (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePartitionIdWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWeightingWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWeightingWithCompletion:"); +- (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWeightingWithParams:subscriptionEstablished:"); ++ (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWeightingWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDataVersionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDataVersionWithCompletion:"); +- (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDataVersionWithParams:subscriptionEstablished:"); ++ (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDataVersionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeStableDataVersionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStableDataVersionWithCompletion:"); +- (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStableDataVersionWithParams:subscriptionEstablished:"); ++ (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStableDataVersionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLeaderRouterIdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLeaderRouterIdWithCompletion:"); +- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLeaderRouterIdWithParams:subscriptionEstablished:"); ++ (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLeaderRouterIdWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDetachedRoleCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDetachedRoleCountWithCompletion:"); +- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDetachedRoleCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDetachedRoleCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeChildRoleCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeChildRoleCountWithCompletion:"); +- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeChildRoleCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeChildRoleCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRouterRoleCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRouterRoleCountWithCompletion:"); +- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRouterRoleCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRouterRoleCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLeaderRoleCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLeaderRoleCountWithCompletion:"); +- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLeaderRoleCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLeaderRoleCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttachAttemptCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttachAttemptCountWithCompletion:"); +- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttachAttemptCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttachAttemptCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePartitionIdChangeCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePartitionIdChangeCountWithCompletion:"); +- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePartitionIdChangeCountWithParams:subscriptionEstablished:"); ++ (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePartitionIdChangeCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBetterPartitionAttachAttemptCountWithCompletion:"); +- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBetterPartitionAttachAttemptCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeParentChangeCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeParentChangeCountWithCompletion:"); +- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeParentChangeCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeParentChangeCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxTotalCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxTotalCountWithCompletion:"); +- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxTotalCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxTotalCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxUnicastCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxUnicastCountWithCompletion:"); +- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxUnicastCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxUnicastCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxBroadcastCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxBroadcastCountWithCompletion:"); +- (void) + subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxBroadcastCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxBroadcastCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxAckRequestedCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxAckRequestedCountWithCompletion:"); +- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxAckRequestedCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxAckRequestedCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxAckedCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxAckedCountWithCompletion:"); +- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxAckedCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxAckedCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxNoAckRequestedCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxNoAckRequestedCountWithCompletion:"); +- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxNoAckRequestedCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxNoAckRequestedCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxDataCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxDataCountWithCompletion:"); +- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxDataCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxDataCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxDataPollCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxDataPollCountWithCompletion:"); +- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxDataPollCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxDataPollCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxBeaconCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxBeaconCountWithCompletion:"); +- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxBeaconCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxBeaconCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxBeaconRequestCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxBeaconRequestCountWithCompletion:"); +- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxBeaconRequestCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxBeaconRequestCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxOtherCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxOtherCountWithCompletion:"); +- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxOtherCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxOtherCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxRetryCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxRetryCountWithCompletion:"); +- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxRetryCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxRetryCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxDirectMaxRetryExpiryCountWithCompletion:"); +- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:"); +- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxErrCcaCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxErrCcaCountWithCompletion:"); +- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxErrCcaCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxErrCcaCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxErrAbortCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxErrAbortCountWithCompletion:"); +- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxErrAbortCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxErrAbortCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxErrBusyChannelCountWithCompletion:"); +- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxErrBusyChannelCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxErrBusyChannelCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxTotalCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxTotalCountWithCompletion:"); +- (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxTotalCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxTotalCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxUnicastCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxUnicastCountWithCompletion:"); +- (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxUnicastCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxUnicastCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxBroadcastCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxBroadcastCountWithCompletion:"); +- (void) + subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxBroadcastCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxBroadcastCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxDataCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxDataCountWithCompletion:"); +- (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxDataCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxDataCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxDataPollCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxDataPollCountWithCompletion:"); +- (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxDataPollCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxDataPollCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxBeaconCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxBeaconCountWithCompletion:"); +- (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxBeaconCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxBeaconCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxBeaconRequestCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxBeaconRequestCountWithCompletion:"); +- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxBeaconRequestCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxBeaconRequestCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxOtherCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxOtherCountWithCompletion:"); +- (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxOtherCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxOtherCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxAddressFilteredCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxAddressFilteredCountWithCompletion:"); +- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxAddressFilteredCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxAddressFilteredCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxDestAddrFilteredCountWithCompletion:"); +- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxDestAddrFilteredCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxDestAddrFilteredCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxDuplicatedCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxDuplicatedCountWithCompletion:"); +- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxDuplicatedCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxDuplicatedCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxErrNoFrameCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrNoFrameCountWithCompletion:"); +- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxErrNoFrameCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrNoFrameCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrUnknownNeighborCountWithCompletion:"); +- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxErrUnknownNeighborCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrUnknownNeighborCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrInvalidSrcAddrCountWithCompletion:"); +- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxErrInvalidSrcAddrCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxErrSecCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrSecCountWithCompletion:"); +- (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxErrSecCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrSecCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxErrFcsCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrFcsCountWithCompletion:"); +- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxErrFcsCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrFcsCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRxErrOtherCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrOtherCountWithCompletion:"); +- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRxErrOtherCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRxErrOtherCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActiveTimestampWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveTimestampWithCompletion:"); +- (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveTimestampWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveTimestampWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePendingTimestampWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePendingTimestampWithCompletion:"); +- (void) + subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePendingTimestampWithParams:subscriptionEstablished:"); ++ (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePendingTimestampWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDelayWithCompletion:"); +- (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDelayWithParams:subscriptionEstablished:"); ++ (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDelayWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSecurityPolicyWithCompletionHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSecurityPolicyWithCompletion:"); +- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSecurityPolicyWithParams:subscriptionEstablished:"); ++ (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSecurityPolicyWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeChannelPage0MaskWithCompletionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeChannelPage0MaskWithCompletion:"); +- (void) + subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeChannelPage0MaskWithParams:subscriptionEstablished:"); ++ (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeChannelPage0MaskWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOperationalDatasetComponentsWithCompletionHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOperationalDatasetComponentsWithCompletion:"); +- (void) + subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOperationalDatasetComponentsWithParams:subscriptionEstablished:"); ++ (void) + readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOperationalDatasetComponentsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActiveNetworkFaultsListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveNetworkFaultsListWithCompletion:"); +- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveNetworkFaultsListWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveNetworkFaultsListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterWiFiNetworkDiagnostics (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithParams:completion:"); +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithCompletion:"); + +- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBssidWithCompletion:"); +- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBssidWithParams:subscriptionEstablished:"); ++ (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBssidWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSecurityTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSecurityTypeWithCompletion:"); +- (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSecurityTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSecurityTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWiFiVersionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiFiVersionWithCompletion:"); +- (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWiFiVersionWithParams:subscriptionEstablished:"); ++ (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWiFiVersionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeChannelNumberWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeChannelNumberWithCompletion:"); +- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeChannelNumberWithParams:subscriptionEstablished:"); ++ (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeChannelNumberWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRssiWithCompletion:"); +- (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRssiWithParams:subscriptionEstablished:"); ++ (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRssiWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBeaconLostCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBeaconLostCountWithCompletion:"); +- (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBeaconLostCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBeaconLostCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBeaconRxCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBeaconRxCountWithCompletion:"); +- (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBeaconRxCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBeaconRxCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePacketMulticastRxCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketMulticastRxCountWithCompletion:"); +- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePacketMulticastRxCountWithParams:subscriptionEstablished:"); ++ (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketMulticastRxCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePacketMulticastTxCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketMulticastTxCountWithCompletion:"); +- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePacketMulticastTxCountWithParams:subscriptionEstablished:"); ++ (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketMulticastTxCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePacketUnicastRxCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketUnicastRxCountWithCompletion:"); +- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePacketUnicastRxCountWithParams:subscriptionEstablished:"); ++ (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketUnicastRxCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePacketUnicastTxCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketUnicastTxCountWithCompletion:"); +- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePacketUnicastTxCountWithParams:subscriptionEstablished:"); ++ (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketUnicastTxCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentMaxRateWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentMaxRateWithCompletion:"); +- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentMaxRateWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentMaxRateWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOverrunCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOverrunCountWithCompletion:"); +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOverrunCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOverrunCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterEthernetNetworkDiagnostics (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithParams:completion:"); +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithCompletion:"); + +- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePHYRateWithCompletion:"); +- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePHYRateWithParams:subscriptionEstablished:"); ++ (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePHYRateWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFullDuplexWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFullDuplexWithCompletion:"); +- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFullDuplexWithParams:subscriptionEstablished:"); ++ (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFullDuplexWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePacketRxCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketRxCountWithCompletion:"); +- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePacketRxCountWithParams:subscriptionEstablished:"); ++ (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketRxCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePacketTxCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketTxCountWithCompletion:"); +- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePacketTxCountWithParams:subscriptionEstablished:"); ++ (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePacketTxCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTxErrCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxErrCountWithCompletion:"); +- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTxErrCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTxErrCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCollisionCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCollisionCountWithCompletion:"); +- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCollisionCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCollisionCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOverrunCountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOverrunCountWithCompletion:"); +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOverrunCountWithParams:subscriptionEstablished:"); ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOverrunCountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCarrierDetectWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCarrierDetectWithCompletion:"); +- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCarrierDetectWithParams:subscriptionEstablished:"); ++ (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCarrierDetectWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTimeSinceResetWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTimeSinceResetWithCompletion:"); +- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTimeSinceResetWithParams:subscriptionEstablished:"); ++ (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTimeSinceResetWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterBridgedDeviceBasic (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeVendorNameWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorNameWithCompletion:"); +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeVendorNameWithParams:subscriptionEstablished:"); ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorNameWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeVendorIDWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorIDWithCompletion:"); +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeVendorIDWithParams:subscriptionEstablished:"); ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorIDWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeProductNameWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductNameWithCompletion:"); +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeProductNameWithParams:subscriptionEstablished:"); ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductNameWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNodeLabelWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNodeLabelWithCompletion:"); +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNodeLabelWithValue:completion:"); +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNodeLabelWithValue:params:completion:"); +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNodeLabelWithParams:subscriptionEstablished:"); ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNodeLabelWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeHardwareVersionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHardwareVersionWithCompletion:"); +- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeHardwareVersionWithParams:subscriptionEstablished:"); ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHardwareVersionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeHardwareVersionStringWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHardwareVersionStringWithCompletion:"); +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeHardwareVersionStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHardwareVersionStringWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSoftwareVersionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSoftwareVersionWithCompletion:"); +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSoftwareVersionWithParams:subscriptionEstablished:"); ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSoftwareVersionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSoftwareVersionStringWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSoftwareVersionStringWithCompletion:"); +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSoftwareVersionStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSoftwareVersionStringWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeManufacturingDateWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeManufacturingDateWithCompletion:"); +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeManufacturingDateWithParams:subscriptionEstablished:"); ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeManufacturingDateWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePartNumberWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePartNumberWithCompletion:"); +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePartNumberWithParams:subscriptionEstablished:"); ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePartNumberWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeProductURLWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductURLWithCompletion:"); +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeProductURLWithParams:subscriptionEstablished:"); ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductURLWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeProductLabelWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductLabelWithCompletion:"); +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeProductLabelWithParams:subscriptionEstablished:"); ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductLabelWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSerialNumberWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSerialNumberWithCompletion:"); +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSerialNumberWithParams:subscriptionEstablished:"); ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSerialNumberWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeReachableWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReachableWithCompletion:"); +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeReachableWithParams:subscriptionEstablished:"); ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReachableWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUniqueIDWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUniqueIDWithCompletion:"); +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUniqueIDWithParams:subscriptionEstablished:"); ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUniqueIDWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterSwitch (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeNumberOfPositionsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfPositionsWithCompletion:"); +- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNumberOfPositionsWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfPositionsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentPositionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionWithCompletion:"); +- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentPositionWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMultiPressMaxWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMultiPressMaxWithCompletion:"); +- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMultiPressMaxWithParams:subscriptionEstablished:"); ++ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMultiPressMaxWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterAdministratorCommissioning (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use openCommissioningWindowWithParams:completion:"); +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use openBasicCommissioningWindowWithParams:completion:"); +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use revokeCommissioningWithParams:completion:"); +- (void)revokeCommissioningWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use revokeCommissioningWithCompletion:"); + +- (void)readAttributeWindowStatusWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWindowStatusWithCompletion:"); +- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWindowStatusWithParams:subscriptionEstablished:"); ++ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWindowStatusWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAdminFabricIndexWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAdminFabricIndexWithCompletion:"); +- (void) + subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAdminFabricIndexWithParams:subscriptionEstablished:"); ++ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAdminFabricIndexWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAdminVendorIdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAdminVendorIdWithCompletion:"); +- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAdminVendorIdWithParams:subscriptionEstablished:"); ++ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAdminVendorIdWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterOperationalCredentials (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use attestationRequestWithParams:completion:"); +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use certificateChainRequestWithParams:completion:"); +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use CSRRequestWithParams:completion:"); +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use addNOCWithParams:completion:"); +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use updateNOCWithParams:completion:"); +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use updateFabricLabelWithParams:completion:"); +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use removeFabricWithParams:completion:"); +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use addTrustedRootCertificateWithParams:completion:"); + +- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNOCsWithParams:completion:"); +- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNOCsWithParams:subscriptionEstablished:"); ++ (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNOCsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFabricsWithParams:completion:"); +- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFabricsWithParams:subscriptionEstablished:"); ++ (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFabricsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSupportedFabricsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedFabricsWithCompletion:"); +- (void) + subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSupportedFabricsWithParams:subscriptionEstablished:"); ++ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedFabricsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCommissionedFabricsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCommissionedFabricsWithCompletion:"); +- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCommissionedFabricsWithParams:subscriptionEstablished:"); ++ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCommissionedFabricsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTrustedRootCertificatesWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTrustedRootCertificatesWithCompletion:"); +- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTrustedRootCertificatesWithParams:subscriptionEstablished:"); ++ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTrustedRootCertificatesWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentFabricIndexWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentFabricIndexWithCompletion:"); +- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentFabricIndexWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentFabricIndexWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterGroupKeyManagement (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use keySetWriteWithParams:completion:"); +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use keySetReadWithParams:completion:"); +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use keySetRemoveWithParams:completion:"); +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use keySetReadAllIndicesWithParams:completion:"); + +- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGroupKeyMapWithParams:completion:"); +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeGroupKeyMapWithValue:completion:"); +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeGroupKeyMapWithValue:params:completion:"); +- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGroupKeyMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGroupKeyMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGroupTableWithParams:completion:"); +- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGroupTableWithParams:subscriptionEstablished:"); ++ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGroupTableWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxGroupsPerFabricWithCompletion:"); +- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxGroupsPerFabricWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxGroupsPerFabricWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxGroupKeysPerFabricWithCompletion:"); +- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxGroupKeysPerFabricWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxGroupKeysPerFabricWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterFixedLabel (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeLabelListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLabelListWithCompletion:"); +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLabelListWithParams:subscriptionEstablished:"); ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLabelListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterUserLabel (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeLabelListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLabelListWithCompletion:"); +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLabelListWithValue:completion:"); +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLabelListWithValue:params:completion:"); +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLabelListWithParams:subscriptionEstablished:"); ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLabelListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterBooleanState (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeStateValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStateValueWithCompletion:"); +- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStateValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStateValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterModeSelect (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use changeToModeWithParams:completion:"); + +- (void)readAttributeDescriptionWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDescriptionWithCompletion:"); +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDescriptionWithParams:subscriptionEstablished:"); ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDescriptionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeStandardNamespaceWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStandardNamespaceWithCompletion:"); +- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStandardNamespaceWithParams:subscriptionEstablished:"); ++ (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStandardNamespaceWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSupportedModesWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedModesWithCompletion:"); +- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSupportedModesWithParams:subscriptionEstablished:"); ++ (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedModesWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentModeWithCompletion:"); +- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeStartUpModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartUpModeWithCompletion:"); +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeStartUpModeWithValue:completion:"); +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeStartUpModeWithValue:params:completion:"); +- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStartUpModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartUpModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnModeWithCompletion:"); +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOnModeWithValue:completion:"); +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOnModeWithValue:params:completion:"); +- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOnModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOnModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterDoorLock (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use lockDoorWithParams:completion:"); +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use unlockDoorWithParams:completion:"); +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use unlockWithTimeoutWithParams:completion:"); +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use setWeekDayScheduleWithParams:completion:"); +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getWeekDayScheduleWithParams:completion:"); +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearWeekDayScheduleWithParams:completion:"); +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use setYearDayScheduleWithParams:completion:"); +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getYearDayScheduleWithParams:completion:"); +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearYearDayScheduleWithParams:completion:"); +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use setHolidayScheduleWithParams:completion:"); +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getHolidayScheduleWithParams:completion:"); +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearHolidayScheduleWithParams:completion:"); +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use setUserWithParams:completion:"); +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params + completionHandler: + (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getUserWithParams:completion:"); +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearUserWithParams:completion:"); +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params + completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use setCredentialWithParams:completion:"); +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getCredentialStatusWithParams:completion:"); +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearCredentialWithParams:completion:"); + +- (void)readAttributeLockStateWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLockStateWithCompletion:"); +- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLockStateWithParams:subscriptionEstablished:"); ++ (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLockStateWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLockTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLockTypeWithCompletion:"); +- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLockTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLockTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActuatorEnabledWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActuatorEnabledWithCompletion:"); +- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActuatorEnabledWithParams:subscriptionEstablished:"); ++ (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActuatorEnabledWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDoorStateWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDoorStateWithCompletion:"); +- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDoorStateWithParams:subscriptionEstablished:"); ++ (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDoorStateWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDoorOpenEventsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDoorOpenEventsWithCompletion:"); +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeDoorOpenEventsWithValue:completion:"); +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeDoorOpenEventsWithValue:params:completion:"); +- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDoorOpenEventsWithParams:subscriptionEstablished:"); ++ (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDoorOpenEventsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDoorClosedEventsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDoorClosedEventsWithCompletion:"); +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeDoorClosedEventsWithValue:completion:"); +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeDoorClosedEventsWithValue:params:completion:"); +- (void) + subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDoorClosedEventsWithParams:subscriptionEstablished:"); ++ (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDoorClosedEventsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOpenPeriodWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOpenPeriodWithCompletion:"); +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOpenPeriodWithValue:completion:"); +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOpenPeriodWithValue:params:completion:"); +- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOpenPeriodWithParams:subscriptionEstablished:"); ++ (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOpenPeriodWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfTotalUsersSupportedWithCompletion:"); +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNumberOfTotalUsersSupportedWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfTotalUsersSupportedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfPINUsersSupportedWithCompletion:"); +- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNumberOfPINUsersSupportedWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfPINUsersSupportedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfRFIDUsersSupportedWithCompletion:"); +- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNumberOfRFIDUsersSupportedWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:"); +- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED( + "Please use subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:"); +- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED( + "Please use subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:"); +- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxPINCodeLengthWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxPINCodeLengthWithCompletion:"); +- (void) + subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxPINCodeLengthWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxPINCodeLengthWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinPINCodeLengthWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinPINCodeLengthWithCompletion:"); +- (void) + subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinPINCodeLengthWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinPINCodeLengthWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxRFIDCodeLengthWithCompletion:"); +- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxRFIDCodeLengthWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxRFIDCodeLengthWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinRFIDCodeLengthWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinRFIDCodeLengthWithCompletion:"); +- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinRFIDCodeLengthWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinRFIDCodeLengthWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCredentialRulesSupportWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCredentialRulesSupportWithCompletion:"); +- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCredentialRulesSupportWithParams:subscriptionEstablished:"); ++ (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCredentialRulesSupportWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:"); +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLanguageWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLanguageWithCompletion:"); +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLanguageWithValue:completion:"); +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLanguageWithValue:params:completion:"); +- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLanguageWithParams:subscriptionEstablished:"); ++ (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLanguageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLEDSettingsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLEDSettingsWithCompletion:"); +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLEDSettingsWithValue:completion:"); +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLEDSettingsWithValue:params:completion:"); +- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLEDSettingsWithParams:subscriptionEstablished:"); ++ (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLEDSettingsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAutoRelockTimeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAutoRelockTimeWithCompletion:"); +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeAutoRelockTimeWithValue:completion:"); +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeAutoRelockTimeWithValue:params:completion:"); +- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAutoRelockTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAutoRelockTimeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSoundVolumeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSoundVolumeWithCompletion:"); +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSoundVolumeWithValue:completion:"); +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSoundVolumeWithValue:params:completion:"); +- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSoundVolumeWithParams:subscriptionEstablished:"); ++ (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSoundVolumeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOperatingModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOperatingModeWithCompletion:"); +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOperatingModeWithValue:completion:"); +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOperatingModeWithValue:params:completion:"); +- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOperatingModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOperatingModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSupportedOperatingModesWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedOperatingModesWithCompletion:"); +- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSupportedOperatingModesWithParams:subscriptionEstablished:"); ++ (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedOperatingModesWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDefaultConfigurationRegisterWithCompletion:"); +- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDefaultConfigurationRegisterWithParams:subscriptionEstablished:"); ++ (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDefaultConfigurationRegisterWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEnableLocalProgrammingWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnableLocalProgrammingWithCompletion:"); +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnableLocalProgrammingWithValue:completion:"); +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnableLocalProgrammingWithValue:params:completion:"); +- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEnableLocalProgrammingWithParams:subscriptionEstablished:"); ++ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnableLocalProgrammingWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEnableOneTouchLockingWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnableOneTouchLockingWithCompletion:"); +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnableOneTouchLockingWithValue:completion:"); +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnableOneTouchLockingWithValue:params:completion:"); +- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEnableOneTouchLockingWithParams:subscriptionEstablished:"); ++ (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnableOneTouchLockingWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnableInsideStatusLEDWithCompletion:"); +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnableInsideStatusLEDWithValue:completion:"); +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnableInsideStatusLEDWithValue:params:completion:"); +- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEnableInsideStatusLEDWithParams:subscriptionEstablished:"); ++ (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnableInsideStatusLEDWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnablePrivacyModeButtonWithCompletion:"); +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnablePrivacyModeButtonWithValue:completion:"); +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnablePrivacyModeButtonWithValue:params:completion:"); +- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEnablePrivacyModeButtonWithParams:subscriptionEstablished:"); ++ (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnablePrivacyModeButtonWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocalProgrammingFeaturesWithCompletion:"); +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLocalProgrammingFeaturesWithValue:completion:"); +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLocalProgrammingFeaturesWithValue:params:completion:"); +- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLocalProgrammingFeaturesWithParams:subscriptionEstablished:"); ++ (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocalProgrammingFeaturesWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWrongCodeEntryLimitWithCompletion:"); +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeWrongCodeEntryLimitWithValue:completion:"); +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeWrongCodeEntryLimitWithValue:params:completion:"); +- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWrongCodeEntryLimitWithParams:subscriptionEstablished:"); ++ (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWrongCodeEntryLimitWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUserCodeTemporaryDisableTimeWithCompletion:"); +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUserCodeTemporaryDisableTimeWithValue:completion:"); +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUserCodeTemporaryDisableTimeWithValue:params:completion:"); +- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUserCodeTemporaryDisableTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSendPINOverTheAirWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSendPINOverTheAirWithCompletion:"); +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSendPINOverTheAirWithValue:completion:"); +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSendPINOverTheAirWithValue:params:completion:"); +- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSendPINOverTheAirWithParams:subscriptionEstablished:"); ++ (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSendPINOverTheAirWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRequirePINforRemoteOperationWithCompletion:"); +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRequirePINforRemoteOperationWithValue:completion:"); +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRequirePINforRemoteOperationWithValue:params:completion:"); +- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRequirePINforRemoteOperationWithParams:subscriptionEstablished:"); ++ (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRequirePINforRemoteOperationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeExpiringUserTimeoutWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeExpiringUserTimeoutWithCompletion:"); +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeExpiringUserTimeoutWithValue:completion:"); +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeExpiringUserTimeoutWithValue:params:completion:"); +- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeExpiringUserTimeoutWithParams:subscriptionEstablished:"); ++ (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeExpiringUserTimeoutWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterWindowCovering (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use upOrOpenWithParams:completion:"); +- (void)upOrOpenWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use upOrOpenWithCompletion:"); +- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use downOrCloseWithParams:completion:"); +- (void)downOrCloseWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use downOrCloseWithCompletion:"); +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stopMotionWithParams:completion:"); +- (void)stopMotionWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stopMotionWithCompletion:"); +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use goToLiftValueWithParams:completion:"); +- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use goToLiftPercentageWithParams:completion:"); +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use goToTiltValueWithParams:completion:"); +- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use goToTiltPercentageWithParams:completion:"); + +- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTypeWithCompletion:"); +- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhysicalClosedLimitLiftWithCompletion:"); +- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePhysicalClosedLimitLiftWithParams:subscriptionEstablished:"); ++ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhysicalClosedLimitLiftWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhysicalClosedLimitTiltWithCompletion:"); +- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePhysicalClosedLimitTiltWithParams:subscriptionEstablished:"); ++ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhysicalClosedLimitTiltWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentPositionLiftWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionLiftWithCompletion:"); +- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentPositionLiftWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionLiftWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentPositionTiltWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionTiltWithCompletion:"); +- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentPositionTiltWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionTiltWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfActuationsLiftWithCompletion:"); +- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNumberOfActuationsLiftWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfActuationsLiftWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfActuationsTiltWithCompletion:"); +- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNumberOfActuationsTiltWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfActuationsTiltWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeConfigStatusWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeConfigStatusWithCompletion:"); +- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeConfigStatusWithParams:subscriptionEstablished:"); ++ (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeConfigStatusWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionLiftPercentageWithCompletion:"); +- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentPositionLiftPercentageWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionLiftPercentageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionTiltPercentageWithCompletion:"); +- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentPositionTiltPercentageWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionTiltPercentageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOperationalStatusWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOperationalStatusWithCompletion:"); +- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOperationalStatusWithParams:subscriptionEstablished:"); ++ (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOperationalStatusWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTargetPositionLiftPercent100thsWithCompletion:"); +- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTargetPositionLiftPercent100thsWithParams:subscriptionEstablished:"); ++ (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTargetPositionLiftPercent100thsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTargetPositionTiltPercent100thsWithCompletion:"); +- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTargetPositionTiltPercent100thsWithParams:subscriptionEstablished:"); ++ (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTargetPositionTiltPercent100thsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEndProductTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEndProductTypeWithCompletion:"); +- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEndProductTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEndProductTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionLiftPercent100thsWithCompletion:"); +- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentPositionLiftPercent100thsWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionTiltPercent100thsWithCompletion:"); +- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentPositionTiltPercent100thsWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstalledOpenLimitLiftWithCompletion:"); +- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInstalledOpenLimitLiftWithParams:subscriptionEstablished:"); ++ (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstalledOpenLimitLiftWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstalledClosedLimitLiftWithCompletion:"); +- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInstalledClosedLimitLiftWithParams:subscriptionEstablished:"); ++ (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstalledClosedLimitLiftWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstalledOpenLimitTiltWithCompletion:"); +- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInstalledOpenLimitTiltWithParams:subscriptionEstablished:"); ++ (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstalledOpenLimitTiltWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstalledClosedLimitTiltWithCompletion:"); +- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInstalledClosedLimitTiltWithParams:subscriptionEstablished:"); ++ (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstalledClosedLimitTiltWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeModeWithCompletion:"); +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeModeWithValue:completion:"); +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeModeWithValue:params:completion:"); +- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSafetyStatusWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSafetyStatusWithCompletion:"); +- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSafetyStatusWithParams:subscriptionEstablished:"); ++ (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSafetyStatusWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterBarrierControl (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use barrierControlGoToPercentWithParams:completion:"); +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use barrierControlStopWithParams:completion:"); +- (void)barrierControlStopWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use barrierControlStopWithCompletion:"); + +- (void)readAttributeBarrierMovingStateWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierMovingStateWithCompletion:"); +- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBarrierMovingStateWithParams:subscriptionEstablished:"); ++ (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierMovingStateWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBarrierSafetyStatusWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierSafetyStatusWithCompletion:"); +- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBarrierSafetyStatusWithParams:subscriptionEstablished:"); ++ (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierSafetyStatusWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBarrierCapabilitiesWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierCapabilitiesWithCompletion:"); +- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBarrierCapabilitiesWithParams:subscriptionEstablished:"); ++ (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierCapabilitiesWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBarrierOpenEventsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierOpenEventsWithCompletion:"); +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierOpenEventsWithValue:completion:"); +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierOpenEventsWithValue:params:completion:"); +- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBarrierOpenEventsWithParams:subscriptionEstablished:"); ++ (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierOpenEventsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBarrierCloseEventsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierCloseEventsWithCompletion:"); +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierCloseEventsWithValue:completion:"); +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierCloseEventsWithValue:params:completion:"); +- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBarrierCloseEventsWithParams:subscriptionEstablished:"); ++ (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierCloseEventsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierCommandOpenEventsWithCompletion:"); +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierCommandOpenEventsWithValue:completion:"); +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierCommandOpenEventsWithValue:params:completion:"); +- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBarrierCommandOpenEventsWithParams:subscriptionEstablished:"); ++ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierCommandOpenEventsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierCommandCloseEventsWithCompletion:"); +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierCommandCloseEventsWithValue:completion:"); +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierCommandCloseEventsWithValue:params:completion:"); +- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBarrierCommandCloseEventsWithParams:subscriptionEstablished:"); ++ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierCommandCloseEventsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBarrierOpenPeriodWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierOpenPeriodWithCompletion:"); +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierOpenPeriodWithValue:completion:"); +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierOpenPeriodWithValue:params:completion:"); +- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBarrierOpenPeriodWithParams:subscriptionEstablished:"); ++ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierOpenPeriodWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBarrierClosePeriodWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierClosePeriodWithCompletion:"); +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierClosePeriodWithValue:completion:"); +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBarrierClosePeriodWithValue:params:completion:"); +- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBarrierClosePeriodWithParams:subscriptionEstablished:"); ++ (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierClosePeriodWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBarrierPositionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierPositionWithCompletion:"); +- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBarrierPositionWithParams:subscriptionEstablished:"); ++ (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBarrierPositionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterPumpConfigurationAndControl (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeMaxPressureWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxPressureWithCompletion:"); +- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxPressureWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxPressureWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxSpeedWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxSpeedWithCompletion:"); +- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxSpeedWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxSpeedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxFlowWithCompletion:"); +- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxFlowWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxFlowWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinConstPressureWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinConstPressureWithCompletion:"); +- (void) + subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinConstPressureWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinConstPressureWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxConstPressureWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxConstPressureWithCompletion:"); +- (void) + subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxConstPressureWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxConstPressureWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinCompPressureWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinCompPressureWithCompletion:"); +- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinCompPressureWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinCompPressureWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxCompPressureWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxCompPressureWithCompletion:"); +- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxCompPressureWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxCompPressureWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinConstSpeedWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinConstSpeedWithCompletion:"); +- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinConstSpeedWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinConstSpeedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxConstSpeedWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxConstSpeedWithCompletion:"); +- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxConstSpeedWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxConstSpeedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinConstFlowWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinConstFlowWithCompletion:"); +- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinConstFlowWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinConstFlowWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxConstFlowWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxConstFlowWithCompletion:"); +- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxConstFlowWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxConstFlowWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinConstTempWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinConstTempWithCompletion:"); +- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinConstTempWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinConstTempWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxConstTempWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxConstTempWithCompletion:"); +- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxConstTempWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxConstTempWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePumpStatusWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePumpStatusWithCompletion:"); +- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePumpStatusWithParams:subscriptionEstablished:"); ++ (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePumpStatusWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEffectiveOperationModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEffectiveOperationModeWithCompletion:"); +- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEffectiveOperationModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEffectiveOperationModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEffectiveControlModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEffectiveControlModeWithCompletion:"); +- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEffectiveControlModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEffectiveControlModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCapacityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCapacityWithCompletion:"); +- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCapacityWithParams:subscriptionEstablished:"); ++ (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCapacityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSpeedWithCompletion:"); +- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSpeedWithParams:subscriptionEstablished:"); ++ (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSpeedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLifetimeRunningHoursWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLifetimeRunningHoursWithCompletion:"); +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLifetimeRunningHoursWithValue:completion:"); +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLifetimeRunningHoursWithValue:params:completion:"); +- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLifetimeRunningHoursWithParams:subscriptionEstablished:"); ++ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLifetimeRunningHoursWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerWithCompletion:"); +- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePowerWithParams:subscriptionEstablished:"); ++ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLifetimeEnergyConsumedWithCompletion:"); +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLifetimeEnergyConsumedWithValue:completion:"); +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLifetimeEnergyConsumedWithValue:params:completion:"); +- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLifetimeEnergyConsumedWithParams:subscriptionEstablished:"); ++ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLifetimeEnergyConsumedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOperationModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOperationModeWithCompletion:"); +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOperationModeWithValue:completion:"); +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOperationModeWithValue:params:completion:"); +- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOperationModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOperationModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeControlModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeControlModeWithCompletion:"); +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeControlModeWithValue:completion:"); +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeControlModeWithValue:params:completion:"); +- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeControlModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeControlModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterThermostat (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use setpointRaiseLowerWithParams:completion:"); +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use setWeeklyScheduleWithParams:completion:"); +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params + completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getWeeklyScheduleWithParams:completion:"); +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearWeeklyScheduleWithParams:completion:"); +- (void)clearWeeklyScheduleWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearWeeklyScheduleWithCompletion:"); + +- (void)readAttributeLocalTemperatureWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocalTemperatureWithCompletion:"); +- (void) + subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLocalTemperatureWithParams:subscriptionEstablished:"); ++ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocalTemperatureWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOutdoorTemperatureWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOutdoorTemperatureWithCompletion:"); +- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOutdoorTemperatureWithParams:subscriptionEstablished:"); ++ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOutdoorTemperatureWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOccupancyWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupancyWithCompletion:"); +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOccupancyWithParams:subscriptionEstablished:"); ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupancyWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAbsMinHeatSetpointLimitWithCompletion:"); +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAbsMinHeatSetpointLimitWithParams:subscriptionEstablished:"); ++ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAbsMinHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAbsMaxHeatSetpointLimitWithCompletion:"); +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAbsMaxHeatSetpointLimitWithParams:subscriptionEstablished:"); ++ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAbsMinCoolSetpointLimitWithCompletion:"); +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAbsMinCoolSetpointLimitWithParams:subscriptionEstablished:"); ++ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAbsMinCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAbsMaxCoolSetpointLimitWithCompletion:"); +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAbsMaxCoolSetpointLimitWithParams:subscriptionEstablished:"); ++ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePICoolingDemandWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePICoolingDemandWithCompletion:"); +- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePICoolingDemandWithParams:subscriptionEstablished:"); ++ (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePICoolingDemandWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePIHeatingDemandWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePIHeatingDemandWithCompletion:"); +- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePIHeatingDemandWithParams:subscriptionEstablished:"); ++ (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePIHeatingDemandWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHVACSystemTypeConfigurationWithCompletion:"); +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeHVACSystemTypeConfigurationWithValue:completion:"); +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeHVACSystemTypeConfigurationWithValue:params:completion:"); +- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeHVACSystemTypeConfigurationWithParams:subscriptionEstablished:"); ++ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHVACSystemTypeConfigurationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocalTemperatureCalibrationWithCompletion:"); +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLocalTemperatureCalibrationWithValue:completion:"); +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLocalTemperatureCalibrationWithValue:params:completion:"); +- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLocalTemperatureCalibrationWithParams:subscriptionEstablished:"); ++ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLocalTemperatureCalibrationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupiedCoolingSetpointWithCompletion:"); +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOccupiedCoolingSetpointWithValue:completion:"); +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOccupiedCoolingSetpointWithValue:params:completion:"); +- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOccupiedCoolingSetpointWithParams:subscriptionEstablished:"); ++ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupiedCoolingSetpointWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupiedHeatingSetpointWithCompletion:"); +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOccupiedHeatingSetpointWithValue:completion:"); +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOccupiedHeatingSetpointWithValue:params:completion:"); +- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOccupiedHeatingSetpointWithParams:subscriptionEstablished:"); ++ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupiedHeatingSetpointWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnoccupiedCoolingSetpointWithCompletion:"); +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUnoccupiedCoolingSetpointWithValue:completion:"); +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUnoccupiedCoolingSetpointWithValue:params:completion:"); +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUnoccupiedCoolingSetpointWithParams:subscriptionEstablished:"); ++ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnoccupiedCoolingSetpointWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnoccupiedHeatingSetpointWithCompletion:"); +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUnoccupiedHeatingSetpointWithValue:completion:"); +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUnoccupiedHeatingSetpointWithValue:params:completion:"); +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUnoccupiedHeatingSetpointWithParams:subscriptionEstablished:"); ++ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnoccupiedHeatingSetpointWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinHeatSetpointLimitWithCompletion:"); +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMinHeatSetpointLimitWithValue:completion:"); +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMinHeatSetpointLimitWithValue:params:completion:"); +- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinHeatSetpointLimitWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxHeatSetpointLimitWithCompletion:"); +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMaxHeatSetpointLimitWithValue:completion:"); +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMaxHeatSetpointLimitWithValue:params:completion:"); +- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxHeatSetpointLimitWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinCoolSetpointLimitWithCompletion:"); +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMinCoolSetpointLimitWithValue:completion:"); +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMinCoolSetpointLimitWithValue:params:completion:"); +- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinCoolSetpointLimitWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxCoolSetpointLimitWithCompletion:"); +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMaxCoolSetpointLimitWithValue:completion:"); +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMaxCoolSetpointLimitWithValue:params:completion:"); +- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxCoolSetpointLimitWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinSetpointDeadBandWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinSetpointDeadBandWithCompletion:"); +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMinSetpointDeadBandWithValue:completion:"); +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMinSetpointDeadBandWithValue:params:completion:"); +- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinSetpointDeadBandWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinSetpointDeadBandWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRemoteSensingWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRemoteSensingWithCompletion:"); +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRemoteSensingWithValue:completion:"); +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRemoteSensingWithValue:params:completion:"); +- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRemoteSensingWithParams:subscriptionEstablished:"); ++ (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRemoteSensingWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeControlSequenceOfOperationWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeControlSequenceOfOperationWithCompletion:"); +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeControlSequenceOfOperationWithValue:completion:"); +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeControlSequenceOfOperationWithValue:params:completion:"); +- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeControlSequenceOfOperationWithParams:subscriptionEstablished:"); ++ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeControlSequenceOfOperationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSystemModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSystemModeWithCompletion:"); +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSystemModeWithValue:completion:"); +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSystemModeWithValue:params:completion:"); +- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSystemModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSystemModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeThermostatRunningModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeThermostatRunningModeWithCompletion:"); +- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeThermostatRunningModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeThermostatRunningModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeStartOfWeekWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartOfWeekWithCompletion:"); +- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStartOfWeekWithParams:subscriptionEstablished:"); ++ (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartOfWeekWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfWeeklyTransitionsWithCompletion:"); +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNumberOfWeeklyTransitionsWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfWeeklyTransitionsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfDailyTransitionsWithCompletion:"); +- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNumberOfDailyTransitionsWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfDailyTransitionsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTemperatureSetpointHoldWithCompletion:"); +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldWithValue:completion:"); +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldWithValue:params:completion:"); +- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTemperatureSetpointHoldWithParams:subscriptionEstablished:"); ++ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTemperatureSetpointHoldWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTemperatureSetpointHoldDurationWithCompletion:"); +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldDurationWithValue:completion:"); +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldDurationWithValue:params:completion:"); +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTemperatureSetpointHoldDurationWithParams:subscriptionEstablished:"); ++ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTemperatureSetpointHoldDurationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeThermostatProgrammingOperationModeWithCompletion:"); +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeThermostatProgrammingOperationModeWithValue:completion:"); +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeThermostatProgrammingOperationModeWithValue:params:completion:"); +- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeThermostatProgrammingOperationModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeThermostatProgrammingOperationModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeThermostatRunningStateWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeThermostatRunningStateWithCompletion:"); +- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeThermostatRunningStateWithParams:subscriptionEstablished:"); ++ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeThermostatRunningStateWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSetpointChangeSourceWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSetpointChangeSourceWithCompletion:"); +- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSetpointChangeSourceWithParams:subscriptionEstablished:"); ++ (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSetpointChangeSourceWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSetpointChangeAmountWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSetpointChangeAmountWithCompletion:"); +- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSetpointChangeAmountWithParams:subscriptionEstablished:"); ++ (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSetpointChangeAmountWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSetpointChangeSourceTimestampWithCompletion:"); +- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSetpointChangeSourceTimestampWithParams:subscriptionEstablished:"); ++ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSetpointChangeSourceTimestampWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOccupiedSetbackWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupiedSetbackWithCompletion:"); +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOccupiedSetbackWithValue:completion:"); +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOccupiedSetbackWithValue:params:completion:"); +- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOccupiedSetbackWithParams:subscriptionEstablished:"); ++ (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupiedSetbackWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOccupiedSetbackMinWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupiedSetbackMinWithCompletion:"); +- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOccupiedSetbackMinWithParams:subscriptionEstablished:"); ++ (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupiedSetbackMinWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupiedSetbackMaxWithCompletion:"); +- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOccupiedSetbackMaxWithParams:subscriptionEstablished:"); ++ (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupiedSetbackMaxWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUnoccupiedSetbackWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnoccupiedSetbackWithCompletion:"); +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUnoccupiedSetbackWithValue:completion:"); +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUnoccupiedSetbackWithValue:params:completion:"); +- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUnoccupiedSetbackWithParams:subscriptionEstablished:"); ++ (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnoccupiedSetbackWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnoccupiedSetbackMinWithCompletion:"); +- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUnoccupiedSetbackMinWithParams:subscriptionEstablished:"); ++ (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnoccupiedSetbackMinWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnoccupiedSetbackMaxWithCompletion:"); +- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUnoccupiedSetbackMaxWithParams:subscriptionEstablished:"); ++ (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnoccupiedSetbackMaxWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEmergencyHeatDeltaWithCompletion:"); +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEmergencyHeatDeltaWithValue:completion:"); +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEmergencyHeatDeltaWithValue:params:completion:"); +- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEmergencyHeatDeltaWithParams:subscriptionEstablished:"); ++ (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEmergencyHeatDeltaWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACTypeWithCompletion:"); +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACTypeWithValue:completion:"); +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACTypeWithValue:params:completion:"); +- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeACTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeACCapacityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACCapacityWithCompletion:"); +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACCapacityWithValue:completion:"); +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACCapacityWithValue:params:completion:"); +- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeACCapacityWithParams:subscriptionEstablished:"); ++ (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACCapacityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeACRefrigerantTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACRefrigerantTypeWithCompletion:"); +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACRefrigerantTypeWithValue:completion:"); +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACRefrigerantTypeWithValue:params:completion:"); +- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeACRefrigerantTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACRefrigerantTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeACCompressorTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACCompressorTypeWithCompletion:"); +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACCompressorTypeWithValue:completion:"); +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACCompressorTypeWithValue:params:completion:"); +- (void) + subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeACCompressorTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACCompressorTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeACErrorCodeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACErrorCodeWithCompletion:"); +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACErrorCodeWithValue:completion:"); +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACErrorCodeWithValue:params:completion:"); +- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeACErrorCodeWithParams:subscriptionEstablished:"); ++ (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACErrorCodeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeACLouverPositionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACLouverPositionWithCompletion:"); +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACLouverPositionWithValue:completion:"); +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACLouverPositionWithValue:params:completion:"); +- (void) + subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeACLouverPositionWithParams:subscriptionEstablished:"); ++ (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACLouverPositionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeACCoilTemperatureWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACCoilTemperatureWithCompletion:"); +- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeACCoilTemperatureWithParams:subscriptionEstablished:"); ++ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACCoilTemperatureWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeACCapacityformatWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACCapacityformatWithCompletion:"); +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACCapacityformatWithValue:completion:"); +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeACCapacityformatWithValue:params:completion:"); +- (void) + subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeACCapacityformatWithParams:subscriptionEstablished:"); ++ (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeACCapacityformatWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterFanControl (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFanModeWithCompletion:"); +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeFanModeWithValue:completion:"); +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeFanModeWithValue:params:completion:"); +- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFanModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFanModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFanModeSequenceWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFanModeSequenceWithCompletion:"); +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeFanModeSequenceWithValue:completion:"); +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeFanModeSequenceWithValue:params:completion:"); +- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFanModeSequenceWithParams:subscriptionEstablished:"); ++ (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFanModeSequenceWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePercentSettingWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePercentSettingWithCompletion:"); +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePercentSettingWithValue:completion:"); +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePercentSettingWithValue:params:completion:"); +- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePercentSettingWithParams:subscriptionEstablished:"); ++ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePercentSettingWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePercentCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePercentCurrentWithCompletion:"); +- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePercentCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePercentCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSpeedMaxWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSpeedMaxWithCompletion:"); +- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSpeedMaxWithParams:subscriptionEstablished:"); ++ (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSpeedMaxWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSpeedSettingWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSpeedSettingWithCompletion:"); +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSpeedSettingWithValue:completion:"); +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSpeedSettingWithValue:params:completion:"); +- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSpeedSettingWithParams:subscriptionEstablished:"); ++ (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSpeedSettingWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSpeedCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSpeedCurrentWithCompletion:"); +- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSpeedCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSpeedCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRockSupportWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRockSupportWithCompletion:"); +- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRockSupportWithParams:subscriptionEstablished:"); ++ (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRockSupportWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRockSettingWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRockSettingWithCompletion:"); +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRockSettingWithValue:completion:"); +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRockSettingWithValue:params:completion:"); +- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRockSettingWithParams:subscriptionEstablished:"); ++ (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRockSettingWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWindSupportWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWindSupportWithCompletion:"); +- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWindSupportWithParams:subscriptionEstablished:"); ++ (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWindSupportWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWindSettingWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWindSettingWithCompletion:"); +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeWindSettingWithValue:completion:"); +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeWindSettingWithValue:params:completion:"); +- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWindSettingWithParams:subscriptionEstablished:"); ++ (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWindSettingWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterThermostatUserInterfaceConfiguration (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeTemperatureDisplayModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTemperatureDisplayModeWithCompletion:"); +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeTemperatureDisplayModeWithValue:completion:"); +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeTemperatureDisplayModeWithValue:params:completion:"); +- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTemperatureDisplayModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTemperatureDisplayModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeKeypadLockoutWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeKeypadLockoutWithCompletion:"); +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeKeypadLockoutWithValue:completion:"); +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeKeypadLockoutWithValue:params:completion:"); +- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeKeypadLockoutWithParams:subscriptionEstablished:"); ++ (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeKeypadLockoutWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeScheduleProgrammingVisibilityWithCompletion:"); +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeScheduleProgrammingVisibilityWithValue:completion:"); +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeScheduleProgrammingVisibilityWithValue:params:completion:"); +- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeScheduleProgrammingVisibilityWithParams:subscriptionEstablished:"); ++ (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeScheduleProgrammingVisibilityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterColorControl (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToHueWithParams:completion:"); +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use moveHueWithParams:completion:"); +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use stepHueWithParams:completion:"); +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToSaturationWithParams:completion:"); +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveSaturationWithParams:completion:"); +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stepSaturationWithParams:completion:"); +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToHueAndSaturationWithParams:completion:"); +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToColorWithParams:completion:"); +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveColorWithParams:completion:"); +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stepColorWithParams:completion:"); +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToColorTemperatureWithParams:completion:"); +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedMoveToHueWithParams:completion:"); +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedMoveHueWithParams:completion:"); +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedStepHueWithParams:completion:"); +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedMoveToHueAndSaturationWithParams:completion:"); +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use colorLoopSetWithParams:completion:"); +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stopMoveStepWithParams:completion:"); +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveColorTemperatureWithParams:completion:"); +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stepColorTemperatureWithParams:completion:"); + +- (void)readAttributeCurrentHueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentHueWithCompletion:"); +- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentHueWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentHueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentSaturationWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentSaturationWithCompletion:"); +- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentSaturationWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentSaturationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRemainingTimeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRemainingTimeWithCompletion:"); +- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRemainingTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRemainingTimeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentXWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentXWithCompletion:"); +- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentXWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentXWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentYWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentYWithCompletion:"); +- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentYWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentYWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDriftCompensationWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDriftCompensationWithCompletion:"); +- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDriftCompensationWithParams:subscriptionEstablished:"); ++ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDriftCompensationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCompensationTextWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCompensationTextWithCompletion:"); +- (void) + subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCompensationTextWithParams:subscriptionEstablished:"); ++ (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCompensationTextWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorTemperatureMiredsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorTemperatureMiredsWithCompletion:"); +- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorTemperatureMiredsWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorTemperatureMiredsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorModeWithCompletion:"); +- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOptionsWithCompletion:"); +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOptionsWithValue:completion:"); +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOptionsWithValue:params:completion:"); +- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOptionsWithParams:subscriptionEstablished:"); ++ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOptionsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNumberOfPrimariesWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfPrimariesWithCompletion:"); +- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNumberOfPrimariesWithParams:subscriptionEstablished:"); ++ (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNumberOfPrimariesWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary1XWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary1XWithCompletion:"); +- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary1XWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary1XWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary1YWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary1YWithCompletion:"); +- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary1YWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary1YWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary1IntensityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary1IntensityWithCompletion:"); +- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary1IntensityWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary1IntensityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary2XWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary2XWithCompletion:"); +- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary2XWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary2XWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary2YWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary2YWithCompletion:"); +- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary2YWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary2YWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary2IntensityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary2IntensityWithCompletion:"); +- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary2IntensityWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary2IntensityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary3XWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary3XWithCompletion:"); +- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary3XWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary3XWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary3YWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary3YWithCompletion:"); +- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary3YWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary3YWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary3IntensityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary3IntensityWithCompletion:"); +- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary3IntensityWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary3IntensityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary4XWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary4XWithCompletion:"); +- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary4XWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary4XWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary4YWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary4YWithCompletion:"); +- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary4YWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary4YWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary4IntensityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary4IntensityWithCompletion:"); +- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary4IntensityWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary4IntensityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary5XWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary5XWithCompletion:"); +- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary5XWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary5XWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary5YWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary5YWithCompletion:"); +- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary5YWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary5YWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary5IntensityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary5IntensityWithCompletion:"); +- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary5IntensityWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary5IntensityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary6XWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary6XWithCompletion:"); +- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary6XWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary6XWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary6YWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary6YWithCompletion:"); +- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary6YWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary6YWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePrimary6IntensityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary6IntensityWithCompletion:"); +- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePrimary6IntensityWithParams:subscriptionEstablished:"); ++ (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePrimary6IntensityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWhitePointXWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWhitePointXWithCompletion:"); +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeWhitePointXWithValue:completion:"); +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeWhitePointXWithValue:params:completion:"); +- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWhitePointXWithParams:subscriptionEstablished:"); ++ (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWhitePointXWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWhitePointYWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWhitePointYWithCompletion:"); +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeWhitePointYWithValue:completion:"); +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeWhitePointYWithValue:params:completion:"); +- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWhitePointYWithParams:subscriptionEstablished:"); ++ (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeWhitePointYWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorPointRXWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointRXWithCompletion:"); +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointRXWithValue:completion:"); +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointRXWithValue:params:completion:"); +- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorPointRXWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointRXWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorPointRYWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointRYWithCompletion:"); +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointRYWithValue:completion:"); +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointRYWithValue:params:completion:"); +- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorPointRYWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointRYWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorPointRIntensityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointRIntensityWithCompletion:"); +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointRIntensityWithValue:completion:"); +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointRIntensityWithValue:params:completion:"); +- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorPointRIntensityWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointRIntensityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorPointGXWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointGXWithCompletion:"); +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointGXWithValue:completion:"); +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointGXWithValue:params:completion:"); +- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorPointGXWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointGXWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorPointGYWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointGYWithCompletion:"); +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointGYWithValue:completion:"); +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointGYWithValue:params:completion:"); +- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorPointGYWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointGYWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorPointGIntensityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointGIntensityWithCompletion:"); +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointGIntensityWithValue:completion:"); +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointGIntensityWithValue:params:completion:"); +- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorPointGIntensityWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointGIntensityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorPointBXWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointBXWithCompletion:"); +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointBXWithValue:completion:"); +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointBXWithValue:params:completion:"); +- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorPointBXWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointBXWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorPointBYWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointBYWithCompletion:"); +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointBYWithValue:completion:"); +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointBYWithValue:params:completion:"); +- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorPointBYWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointBYWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorPointBIntensityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointBIntensityWithCompletion:"); +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointBIntensityWithValue:completion:"); +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeColorPointBIntensityWithValue:params:completion:"); +- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorPointBIntensityWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorPointBIntensityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEnhancedCurrentHueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnhancedCurrentHueWithCompletion:"); +- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEnhancedCurrentHueWithParams:subscriptionEstablished:"); ++ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnhancedCurrentHueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEnhancedColorModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnhancedColorModeWithCompletion:"); +- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEnhancedColorModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnhancedColorModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorLoopActiveWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorLoopActiveWithCompletion:"); +- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorLoopActiveWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorLoopActiveWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorLoopDirectionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorLoopDirectionWithCompletion:"); +- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorLoopDirectionWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorLoopDirectionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorLoopTimeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorLoopTimeWithCompletion:"); +- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorLoopTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorLoopTimeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorLoopStartEnhancedHueWithCompletion:"); +- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorLoopStartEnhancedHueWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorLoopStartEnhancedHueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorLoopStoredEnhancedHueWithCompletion:"); +- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorLoopStoredEnhancedHueWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorLoopStoredEnhancedHueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorCapabilitiesWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorCapabilitiesWithCompletion:"); +- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorCapabilitiesWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorCapabilitiesWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorTempPhysicalMinMiredsWithCompletion:"); +- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorTempPhysicalMinMiredsWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorTempPhysicalMinMiredsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorTempPhysicalMaxMiredsWithCompletion:"); +- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeColorTempPhysicalMaxMiredsWithParams:subscriptionEstablished:"); ++ (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:"); +- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:subscriptionEstablished:"); ++ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartUpColorTemperatureMiredsWithCompletion:"); +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeStartUpColorTemperatureMiredsWithValue:completion:"); +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeStartUpColorTemperatureMiredsWithValue:params:completion:"); +- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStartUpColorTemperatureMiredsWithParams:subscriptionEstablished:"); ++ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartUpColorTemperatureMiredsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterBallastConfiguration (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributePhysicalMinLevelWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhysicalMinLevelWithCompletion:"); +- (void) + subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePhysicalMinLevelWithParams:subscriptionEstablished:"); ++ (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhysicalMinLevelWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePhysicalMaxLevelWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhysicalMaxLevelWithCompletion:"); +- (void) + subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePhysicalMaxLevelWithParams:subscriptionEstablished:"); ++ (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhysicalMaxLevelWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBallastStatusWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBallastStatusWithCompletion:"); +- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBallastStatusWithParams:subscriptionEstablished:"); ++ (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBallastStatusWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinLevelWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinLevelWithCompletion:"); +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMinLevelWithValue:completion:"); +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMinLevelWithValue:params:completion:"); +- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinLevelWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinLevelWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxLevelWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxLevelWithCompletion:"); +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMaxLevelWithValue:completion:"); +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeMaxLevelWithValue:params:completion:"); +- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxLevelWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxLevelWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeIntrinsicBalanceFactorWithCompletion:"); +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeIntrinsicBalanceFactorWithValue:completion:"); +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeIntrinsicBalanceFactorWithValue:params:completion:"); +- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeIntrinsicBalanceFactorWithParams:subscriptionEstablished:"); ++ (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeIntrinsicBalanceFactorWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBallastFactorAdjustmentWithCompletion:"); +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBallastFactorAdjustmentWithValue:completion:"); +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBallastFactorAdjustmentWithValue:params:completion:"); +- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBallastFactorAdjustmentWithParams:subscriptionEstablished:"); ++ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBallastFactorAdjustmentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLampQuantityWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampQuantityWithCompletion:"); +- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLampQuantityWithParams:subscriptionEstablished:"); ++ (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampQuantityWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLampTypeWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampTypeWithCompletion:"); +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampTypeWithValue:completion:"); +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampTypeWithValue:params:completion:"); +- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLampTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLampManufacturerWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampManufacturerWithCompletion:"); +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampManufacturerWithValue:completion:"); +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampManufacturerWithValue:params:completion:"); +- (void) + subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLampManufacturerWithParams:subscriptionEstablished:"); ++ (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampManufacturerWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLampRatedHoursWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampRatedHoursWithCompletion:"); +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampRatedHoursWithValue:completion:"); +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampRatedHoursWithValue:params:completion:"); +- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLampRatedHoursWithParams:subscriptionEstablished:"); ++ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampRatedHoursWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLampBurnHoursWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampBurnHoursWithCompletion:"); +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampBurnHoursWithValue:completion:"); +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampBurnHoursWithValue:params:completion:"); +- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLampBurnHoursWithParams:subscriptionEstablished:"); ++ (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampBurnHoursWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLampAlarmModeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampAlarmModeWithCompletion:"); +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampAlarmModeWithValue:completion:"); +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampAlarmModeWithValue:params:completion:"); +- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLampAlarmModeWithParams:subscriptionEstablished:"); ++ (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampAlarmModeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampBurnHoursTripPointWithCompletion:"); +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampBurnHoursTripPointWithValue:completion:"); +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLampBurnHoursTripPointWithValue:params:completion:"); +- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLampBurnHoursTripPointWithParams:subscriptionEstablished:"); ++ (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLampBurnHoursTripPointWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterIlluminanceMeasurement (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:"); +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:"); +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:"); +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeToleranceWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeToleranceWithCompletion:"); +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:"); ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLightSensorTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLightSensorTypeWithCompletion:"); +- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLightSensorTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLightSensorTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterTemperatureMeasurement (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:"); +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:"); +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:"); +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeToleranceWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeToleranceWithCompletion:"); +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:"); ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterPressureMeasurement (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:"); +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:"); +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:"); +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeToleranceWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeToleranceWithCompletion:"); +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:"); ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeScaledValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeScaledValueWithCompletion:"); +- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeScaledValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeScaledValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinScaledValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinScaledValueWithCompletion:"); +- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinScaledValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinScaledValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxScaledValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxScaledValueWithCompletion:"); +- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxScaledValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxScaledValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeScaledToleranceWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeScaledToleranceWithCompletion:"); +- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeScaledToleranceWithParams:subscriptionEstablished:"); ++ (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeScaledToleranceWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeScaleWithCompletion:"); +- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeScaleWithParams:subscriptionEstablished:"); ++ (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeScaleWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterFlowMeasurement (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:"); +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:"); +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:"); +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeToleranceWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeToleranceWithCompletion:"); +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:"); ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterRelativeHumidityMeasurement (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:"); +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMinMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:"); +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:"); +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:"); ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeToleranceWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeToleranceWithCompletion:"); +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:"); ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterOccupancySensing (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeOccupancyWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupancyWithCompletion:"); +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOccupancyWithParams:subscriptionEstablished:"); ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupancyWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOccupancySensorTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupancySensorTypeWithCompletion:"); +- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOccupancySensorTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupancySensorTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupancySensorTypeBitmapWithCompletion:"); +- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOccupancySensorTypeBitmapWithParams:subscriptionEstablished:"); ++ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOccupancySensorTypeBitmapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePirOccupiedToUnoccupiedDelayWithCompletion:"); +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePirOccupiedToUnoccupiedDelayWithValue:completion:"); +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePirOccupiedToUnoccupiedDelayWithValue:params:completion:"); +- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePirOccupiedToUnoccupiedDelayWithParams:subscriptionEstablished:"); ++ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePirUnoccupiedToOccupiedDelayWithCompletion:"); +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePirUnoccupiedToOccupiedDelayWithValue:completion:"); +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePirUnoccupiedToOccupiedDelayWithValue:params:completion:"); +- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePirUnoccupiedToOccupiedDelayWithParams:subscriptionEstablished:"); ++ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePirUnoccupiedToOccupiedThresholdWithCompletion:"); +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePirUnoccupiedToOccupiedThresholdWithValue:completion:"); +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePirUnoccupiedToOccupiedThresholdWithValue:params:completion:"); +- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePirUnoccupiedToOccupiedThresholdWithParams:subscriptionEstablished:"); ++ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:"); +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:completion:"); +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:params:completion:"); +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:subscriptionEstablished:"); ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:"); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:completion:"); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:params:completion:"); +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:subscriptionEstablished:"); ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:"); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:completion:"); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:params:completion:"); +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:subscriptionEstablished:"); ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:"); +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:completion:"); +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:params:completion:"); +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED( + "Please use subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:subscriptionEstablished:"); ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:"); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:completion:"); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:params:completion:"); +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED( + "Please use subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:subscriptionEstablished:"); ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:"); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:completion:"); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:params:completion:"); +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED( + "Please use subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:subscriptionEstablished:"); ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterWakeOnLan (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeMACAddressWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMACAddressWithCompletion:"); +- (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMACAddressWithParams:subscriptionEstablished:"); ++ (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMACAddressWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterChannel (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params + completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use changeChannelWithParams:completion:"); +- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use changeChannelByNumberWithParams:completion:"); +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use skipChannelWithParams:completion:"); + +- (void)readAttributeChannelListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeChannelListWithCompletion:"); +- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeChannelListWithParams:subscriptionEstablished:"); ++ (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeChannelListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLineupWithCompletionHandler: + (void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLineupWithCompletion:"); +- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLineupWithParams:subscriptionEstablished:"); ++ (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLineupWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentChannelWithCompletionHandler: + (void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentChannelWithCompletion:"); +- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentChannelWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentChannelWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterTargetNavigator (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params + completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use navigateTargetWithParams:completion:"); + +- (void)readAttributeTargetListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTargetListWithCompletion:"); +- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTargetListWithParams:subscriptionEstablished:"); ++ (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTargetListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentTargetWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentTargetWithCompletion:"); +- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentTargetWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentTargetWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterMediaPlayback (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use playWithParams:completion:"); +- (void)playWithCompletionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use playWithCompletion:"); +- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use pauseWithParams:completion:"); +- (void)pauseWithCompletionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use pauseWithCompletion:"); +- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use stopPlaybackWithParams:completion:"); +- (void)stopPlaybackWithCompletionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use stopPlaybackWithCompletion:"); +- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use startOverWithParams:completion:"); +- (void)startOverWithCompletionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use startOverWithCompletion:"); +- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use previousWithParams:completion:"); +- (void)previousWithCompletionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use previousWithCompletion:"); +- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use nextWithParams:completion:"); +- (void)nextWithCompletionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use nextWithCompletion:"); +- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use rewindWithParams:completion:"); +- (void)rewindWithCompletionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use rewindWithCompletion:"); +- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use fastForwardWithParams:completion:"); +- (void)fastForwardWithCompletionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use fastForwardWithCompletion:"); +- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use skipForwardWithParams:completion:"); +- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use skipBackwardWithParams:completion:"); +- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use seekWithParams:completion:"); + +- (void)readAttributeCurrentStateWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentStateWithCompletion:"); +- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentStateWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentStateWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeStartTimeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartTimeWithCompletion:"); +- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStartTimeWithParams:subscriptionEstablished:"); ++ (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStartTimeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDurationWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDurationWithCompletion:"); +- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDurationWithParams:subscriptionEstablished:"); ++ (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDurationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSampledPositionWithCompletionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSampledPositionWithCompletion:"); +- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSampledPositionWithParams:subscriptionEstablished:"); ++ (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSampledPositionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePlaybackSpeedWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePlaybackSpeedWithCompletion:"); +- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePlaybackSpeedWithParams:subscriptionEstablished:"); ++ (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePlaybackSpeedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSeekRangeEndWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSeekRangeEndWithCompletion:"); +- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSeekRangeEndWithParams:subscriptionEstablished:"); ++ (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSeekRangeEndWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSeekRangeStartWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSeekRangeStartWithCompletion:"); +- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSeekRangeStartWithParams:subscriptionEstablished:"); ++ (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSeekRangeStartWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterMediaInput (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use selectInputWithParams:completion:"); +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use showInputStatusWithParams:completion:"); +- (void)showInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use showInputStatusWithCompletion:"); +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use hideInputStatusWithParams:completion:"); +- (void)hideInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use hideInputStatusWithCompletion:"); +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use renameInputWithParams:completion:"); + +- (void)readAttributeInputListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInputListWithCompletion:"); +- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInputListWithParams:subscriptionEstablished:"); ++ (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInputListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentInputWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentInputWithCompletion:"); +- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentInputWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentInputWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterLowPower (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use sleepWithParams:completion:"); +- (void)sleepWithCompletionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use sleepWithCompletion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterKeypadInput (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params + completionHandler: + (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use sendKeyWithParams:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterContentLauncher (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params + completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use launchContentWithParams:completion:"); +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params + completionHandler: + (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use launchURLWithParams:completion:"); + +- (void)readAttributeAcceptHeaderWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptHeaderWithCompletion:"); +- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptHeaderWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptHeaderWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedStreamingProtocolsWithCompletion:"); +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSupportedStreamingProtocolsWithValue:completion:"); +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeSupportedStreamingProtocolsWithValue:params:completion:"); +- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeSupportedStreamingProtocolsWithParams:subscriptionEstablished:"); ++ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeSupportedStreamingProtocolsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterAudioOutput (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use selectOutputWithParams:completion:"); +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use renameOutputWithParams:completion:"); + +- (void)readAttributeOutputListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOutputListWithCompletion:"); +- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOutputListWithParams:subscriptionEstablished:"); ++ (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOutputListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentOutputWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentOutputWithCompletion:"); +- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentOutputWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentOutputWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterApplicationLauncher (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use launchAppWithParams:completion:"); +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use stopAppWithParams:completion:"); +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use hideAppWithParams:completion:"); + +- (void)readAttributeCatalogListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCatalogListWithCompletion:"); +- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCatalogListWithParams:subscriptionEstablished:"); ++ (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCatalogListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentAppWithCompletionHandler: + (void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentAppWithCompletion:"); +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeCurrentAppWithValue:completion:"); +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeCurrentAppWithValue:params:completion:"); +- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentAppWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentAppWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterApplicationBasic (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)readAttributeVendorNameWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorNameWithCompletion:"); +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeVendorNameWithParams:subscriptionEstablished:"); ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorNameWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeVendorIDWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorIDWithCompletion:"); +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeVendorIDWithParams:subscriptionEstablished:"); ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorIDWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeApplicationNameWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApplicationNameWithCompletion:"); +- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeApplicationNameWithParams:subscriptionEstablished:"); ++ (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApplicationNameWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeProductIDWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductIDWithCompletion:"); +- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeProductIDWithParams:subscriptionEstablished:"); ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeProductIDWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeApplicationWithCompletionHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApplicationWithCompletion:"); +- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeApplicationWithParams:subscriptionEstablished:"); ++ (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApplicationWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStatusWithCompletion:"); +- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStatusWithParams:subscriptionEstablished:"); ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStatusWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeApplicationVersionWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApplicationVersionWithCompletion:"); +- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeApplicationVersionWithParams:subscriptionEstablished:"); ++ (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApplicationVersionWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAllowedVendorListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAllowedVendorListWithCompletion:"); +- (void) + subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAllowedVendorListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAllowedVendorListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterAccountLogin (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params + completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getSetupPINWithParams:completion:"); +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use loginWithParams:completion:"); +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use logoutWithParams:completion:"); +- (void)logoutWithCompletionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use logoutWithCompletion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterElectricalMeasurement (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use getProfileInfoCommandWithParams:completion:"); +- (void)getProfileInfoCommandWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use getProfileInfoCommandWithCompletion:"); +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use getMeasurementProfileCommandWithParams:completion:"); + +- (void)readAttributeMeasurementTypeWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasurementTypeWithCompletion:"); +- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasurementTypeWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasurementTypeWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcVoltageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcVoltageWithCompletion:"); +- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcVoltageWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcVoltageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcVoltageMinWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcVoltageMinWithCompletion:"); +- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcVoltageMinWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcVoltageMinWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcVoltageMaxWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcVoltageMaxWithCompletion:"); +- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcVoltageMaxWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcVoltageMaxWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcCurrentWithCompletion:"); +- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcCurrentMinWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcCurrentMinWithCompletion:"); +- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcCurrentMinWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcCurrentMinWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcCurrentMaxWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcCurrentMaxWithCompletion:"); +- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcCurrentMaxWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcCurrentMaxWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcPowerWithCompletion:"); +- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcPowerWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcPowerWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcPowerMinWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcPowerMinWithCompletion:"); +- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcPowerMinWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcPowerMinWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcPowerMaxWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcPowerMaxWithCompletion:"); +- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcPowerMaxWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcPowerMaxWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcVoltageMultiplierWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcVoltageMultiplierWithCompletion:"); +- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcVoltageMultiplierWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcVoltageMultiplierWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcVoltageDivisorWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcVoltageDivisorWithCompletion:"); +- (void) + subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcVoltageDivisorWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcVoltageDivisorWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcCurrentMultiplierWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcCurrentMultiplierWithCompletion:"); +- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcCurrentMultiplierWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcCurrentMultiplierWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcCurrentDivisorWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcCurrentDivisorWithCompletion:"); +- (void) + subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcCurrentDivisorWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcCurrentDivisorWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcPowerMultiplierWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcPowerMultiplierWithCompletion:"); +- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcPowerMultiplierWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcPowerMultiplierWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeDcPowerDivisorWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcPowerDivisorWithCompletion:"); +- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeDcPowerDivisorWithParams:subscriptionEstablished:"); ++ (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeDcPowerDivisorWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcFrequencyWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcFrequencyWithCompletion:"); +- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcFrequencyWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcFrequencyWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcFrequencyMinWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcFrequencyMinWithCompletion:"); +- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcFrequencyMinWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcFrequencyMinWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcFrequencyMaxWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcFrequencyMaxWithCompletion:"); +- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcFrequencyMaxWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcFrequencyMaxWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNeutralCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNeutralCurrentWithCompletion:"); +- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNeutralCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNeutralCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTotalActivePowerWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTotalActivePowerWithCompletion:"); +- (void) + subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTotalActivePowerWithParams:subscriptionEstablished:"); ++ (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTotalActivePowerWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTotalReactivePowerWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTotalReactivePowerWithCompletion:"); +- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTotalReactivePowerWithParams:subscriptionEstablished:"); ++ (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTotalReactivePowerWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTotalApparentPowerWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTotalApparentPowerWithCompletion:"); +- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTotalApparentPowerWithParams:subscriptionEstablished:"); ++ (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTotalApparentPowerWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured1stHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasured1stHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured1stHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured3rdHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasured3rdHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured5thHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasured5thHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured5thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured7thHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasured7thHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured7thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured9thHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasured9thHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured9thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured11thHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasured11thHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasured11thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:"); +- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcFrequencyMultiplierWithCompletion:"); +- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcFrequencyMultiplierWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcFrequencyMultiplierWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcFrequencyDivisorWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcFrequencyDivisorWithCompletion:"); +- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcFrequencyDivisorWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcFrequencyDivisorWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePowerMultiplierWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerMultiplierWithCompletion:"); +- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePowerMultiplierWithParams:subscriptionEstablished:"); ++ (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerMultiplierWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePowerDivisorWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerDivisorWithCompletion:"); +- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePowerDivisorWithParams:subscriptionEstablished:"); ++ (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerDivisorWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHarmonicCurrentMultiplierWithCompletion:"); +- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeHarmonicCurrentMultiplierWithParams:subscriptionEstablished:"); ++ (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeHarmonicCurrentMultiplierWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhaseHarmonicCurrentMultiplierWithCompletion:"); +- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:subscriptionEstablished:"); ++ (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInstantaneousVoltageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstantaneousVoltageWithCompletion:"); +- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInstantaneousVoltageWithParams:subscriptionEstablished:"); ++ (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstantaneousVoltageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstantaneousLineCurrentWithCompletion:"); +- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInstantaneousLineCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstantaneousLineCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstantaneousActiveCurrentWithCompletion:"); +- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInstantaneousActiveCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstantaneousActiveCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstantaneousReactiveCurrentWithCompletion:"); +- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInstantaneousReactiveCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstantaneousReactiveCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInstantaneousPowerWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstantaneousPowerWithCompletion:"); +- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInstantaneousPowerWithParams:subscriptionEstablished:"); ++ (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInstantaneousPowerWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageWithCompletion:"); +- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageMinWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMinWithCompletion:"); +- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageMinWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMinWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageMaxWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMaxWithCompletion:"); +- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageMaxWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMaxWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsCurrentWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentWithCompletion:"); +- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsCurrentWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsCurrentMinWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMinWithCompletion:"); +- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsCurrentMinWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMinWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsCurrentMaxWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMaxWithCompletion:"); +- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsCurrentMaxWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMaxWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActivePowerWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerWithCompletion:"); +- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActivePowerWithParams:subscriptionEstablished:"); ++ (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActivePowerMinWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMinWithCompletion:"); +- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActivePowerMinWithParams:subscriptionEstablished:"); ++ (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMinWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActivePowerMaxWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMaxWithCompletion:"); +- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActivePowerMaxWithParams:subscriptionEstablished:"); ++ (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMaxWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeReactivePowerWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReactivePowerWithCompletion:"); +- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeReactivePowerWithParams:subscriptionEstablished:"); ++ (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReactivePowerWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeApparentPowerWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApparentPowerWithCompletion:"); +- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeApparentPowerWithParams:subscriptionEstablished:"); ++ (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApparentPowerWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePowerFactorWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerFactorWithCompletion:"); +- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePowerFactorWithParams:subscriptionEstablished:"); ++ (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerFactorWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:"); +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:completion:"); +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:params:completion:"); +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:subscriptionEstablished:"); ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterWithCompletion:"); +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeAverageRmsUnderVoltageCounterWithValue:completion:"); +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeAverageRmsUnderVoltageCounterWithValue:params:completion:"); +- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageCounterWithParams:subscriptionEstablished:"); ++ (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodWithCompletion:"); +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRmsExtremeOverVoltagePeriodWithValue:completion:"); +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRmsExtremeOverVoltagePeriodWithValue:params:completion:"); +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:"); +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRmsExtremeUnderVoltagePeriodWithValue:completion:"); +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRmsExtremeUnderVoltagePeriodWithValue:params:completion:"); +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodWithCompletion:"); +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRmsVoltageSagPeriodWithValue:completion:"); +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRmsVoltageSagPeriodWithValue:params:completion:"); +- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageSagPeriodWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodWithCompletion:"); +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRmsVoltageSwellPeriodWithValue:completion:"); +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRmsVoltageSwellPeriodWithValue:params:completion:"); +- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellPeriodWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcVoltageMultiplierWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcVoltageMultiplierWithCompletion:"); +- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcVoltageMultiplierWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcVoltageMultiplierWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcVoltageDivisorWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcVoltageDivisorWithCompletion:"); +- (void) + subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcVoltageDivisorWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcVoltageDivisorWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcCurrentMultiplierWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcCurrentMultiplierWithCompletion:"); +- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcCurrentMultiplierWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcCurrentMultiplierWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcCurrentDivisorWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcCurrentDivisorWithCompletion:"); +- (void) + subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcCurrentDivisorWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcCurrentDivisorWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcPowerMultiplierWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcPowerMultiplierWithCompletion:"); +- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcPowerMultiplierWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcPowerMultiplierWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcPowerDivisorWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcPowerDivisorWithCompletion:"); +- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcPowerDivisorWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcPowerDivisorWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOverloadAlarmsMaskWithCompletion:"); +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOverloadAlarmsMaskWithValue:completion:"); +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOverloadAlarmsMaskWithValue:params:completion:"); +- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOverloadAlarmsMaskWithParams:subscriptionEstablished:"); ++ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOverloadAlarmsMaskWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeVoltageOverloadWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVoltageOverloadWithCompletion:"); +- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeVoltageOverloadWithParams:subscriptionEstablished:"); ++ (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVoltageOverloadWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCurrentOverloadWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentOverloadWithCompletion:"); +- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCurrentOverloadWithParams:subscriptionEstablished:"); ++ (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCurrentOverloadWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcOverloadAlarmsMaskWithCompletion:"); +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeAcOverloadAlarmsMaskWithValue:completion:"); +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeAcOverloadAlarmsMaskWithValue:params:completion:"); +- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcOverloadAlarmsMaskWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcOverloadAlarmsMaskWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcVoltageOverloadWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcVoltageOverloadWithCompletion:"); +- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcVoltageOverloadWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcVoltageOverloadWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcCurrentOverloadWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcCurrentOverloadWithCompletion:"); +- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcCurrentOverloadWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcCurrentOverloadWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcActivePowerOverloadWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcActivePowerOverloadWithCompletion:"); +- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcActivePowerOverloadWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcActivePowerOverloadWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcReactivePowerOverloadWithCompletion:"); +- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcReactivePowerOverloadWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcReactivePowerOverloadWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsOverVoltageWithCompletion:"); +- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAverageRmsOverVoltageWithParams:subscriptionEstablished:"); ++ (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsOverVoltageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageWithCompletion:"); +- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageWithParams:subscriptionEstablished:"); ++ (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeOverVoltageWithCompletion:"); +- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltageWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeOverVoltageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltageWithCompletion:"); +- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltageWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltageWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageSagWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSagWithCompletion:"); +- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageSagWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSagWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageSwellWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSwellWithCompletion:"); +- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSwellWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLineCurrentPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLineCurrentPhaseBWithCompletion:"); +- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLineCurrentPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLineCurrentPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveCurrentPhaseBWithCompletion:"); +- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveCurrentPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveCurrentPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReactiveCurrentPhaseBWithCompletion:"); +- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeReactiveCurrentPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReactiveCurrentPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltagePhaseBWithCompletion:"); +- (void) + subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltagePhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltagePhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseBWithCompletion:"); +- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageMinPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseBWithCompletion:"); +- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageMaxPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentPhaseBWithCompletion:"); +- (void) + subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsCurrentPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseBWithCompletion:"); +- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsCurrentMinPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseBWithCompletion:"); +- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsCurrentMaxPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActivePowerPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerPhaseBWithCompletion:"); +- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActivePowerPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMinPhaseBWithCompletion:"); +- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActivePowerMinPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMinPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMaxPhaseBWithCompletion:"); +- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActivePowerMaxPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMaxPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeReactivePowerPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReactivePowerPhaseBWithCompletion:"); +- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeReactivePowerPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReactivePowerPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeApparentPowerPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApparentPowerPhaseBWithCompletion:"); +- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeApparentPowerPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApparentPowerPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePowerFactorPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerFactorPhaseBWithCompletion:"); +- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePowerFactorPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerFactorPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:"); +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED( + "Please use subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:"); +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:"); +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:"); +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:"); +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:"); +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:"); +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLineCurrentPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLineCurrentPhaseCWithCompletion:"); +- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLineCurrentPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLineCurrentPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveCurrentPhaseCWithCompletion:"); +- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActiveCurrentPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActiveCurrentPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReactiveCurrentPhaseCWithCompletion:"); +- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeReactiveCurrentPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReactiveCurrentPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltagePhaseCWithCompletion:"); +- (void) + subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltagePhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltagePhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseCWithCompletion:"); +- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageMinPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseCWithCompletion:"); +- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageMaxPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentPhaseCWithCompletion:"); +- (void) + subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsCurrentPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseCWithCompletion:"); +- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsCurrentMinPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseCWithCompletion:"); +- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsCurrentMaxPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActivePowerPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerPhaseCWithCompletion:"); +- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActivePowerPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMinPhaseCWithCompletion:"); +- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActivePowerMinPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMinPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMaxPhaseCWithCompletion:"); +- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeActivePowerMaxPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeActivePowerMaxPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeReactivePowerPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReactivePowerPhaseCWithCompletion:"); +- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeReactivePowerPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeReactivePowerPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeApparentPowerPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApparentPowerPhaseCWithCompletion:"); +- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeApparentPowerPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeApparentPowerPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributePowerFactorPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerFactorPhaseCWithCompletion:"); +- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributePowerFactorPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributePowerFactorPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:"); +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED( + "Please use subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:"); +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:"); +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:"); +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:"); +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:"); +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:"); +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:subscriptionEstablished:"); ++ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + +@end + +@interface MTRBaseClusterTestCluster (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpointID:queue:"); + +- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use testWithParams:completion:"); +- (void)testWithCompletionHandler:(MTRStatusCompletion)completionHandler MTR_NEWLY_DEPRECATED("Please use testWithCompletion:"); +- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testNotHandledWithParams:completion:"); +- (void)testNotHandledWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testNotHandledWithCompletion:"); +- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testSpecificWithParams:completion:"); +- (void)testSpecificWithCompletionHandler: + (void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testSpecificWithCompletion:"); +- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testUnknownCommandWithParams:completion:"); +- (void)testUnknownCommandWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testUnknownCommandWithCompletion:"); +- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testAddArgumentsWithParams:completion:"); +- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testSimpleArgumentRequestWithParams:completion:"); +- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params + completionHandler: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testStructArrayArgumentRequestWithParams:completion:"); +- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testStructArgumentRequestWithParams:completion:"); +- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testNestedStructArgumentRequestWithParams:completion:"); +- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testListStructArgumentRequestWithParams:completion:"); +- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testListInt8UArgumentRequestWithParams:completion:"); +- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testNestedStructListArgumentRequestWithParams:completion:"); +- (void)testListNestedStructListArgumentRequestWithParams: + (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testListNestedStructListArgumentRequestWithParams:completion:"); +- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testListInt8UReverseRequestWithParams:completion:"); +- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testEnumsRequestWithParams:completion:"); +- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params + completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testNullableOptionalRequestWithParams:completion:"); +- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params + completionHandler: + (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testComplexNullableOptionalRequestWithParams:completion:"); +- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use simpleStructEchoRequestWithParams:completion:"); +- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use timedInvokeRequestWithParams:completion:"); +- (void)timedInvokeRequestWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use timedInvokeRequestWithCompletion:"); +- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testSimpleOptionalArgumentRequestWithParams:completion:"); +- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testEmitTestEventRequestWithParams:completion:"); +- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + completionHandler: + (void (^)( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testEmitTestFabricScopedEventRequestWithParams:completion:"); + +- (void)readAttributeBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBooleanWithCompletion:"); +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBooleanWithValue:completion:"); +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBooleanWithValue:params:completion:"); +- (void)subscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBooleanWithParams:subscriptionEstablished:"); ++ (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBooleanWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBitmap8WithCompletion:"); +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBitmap8WithValue:completion:"); +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBitmap8WithValue:params:completion:"); +- (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBitmap8WithParams:subscriptionEstablished:"); ++ (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBitmap8WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBitmap16WithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBitmap16WithCompletion:"); +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBitmap16WithValue:completion:"); +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBitmap16WithValue:params:completion:"); +- (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBitmap16WithParams:subscriptionEstablished:"); ++ (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBitmap16WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBitmap32WithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBitmap32WithCompletion:"); +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBitmap32WithValue:completion:"); +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBitmap32WithValue:params:completion:"); +- (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBitmap32WithParams:subscriptionEstablished:"); ++ (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBitmap32WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeBitmap64WithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBitmap64WithCompletion:"); +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBitmap64WithValue:completion:"); +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeBitmap64WithValue:params:completion:"); +- (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeBitmap64WithParams:subscriptionEstablished:"); ++ (void)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeBitmap64WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt8uWithCompletion:"); +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt8uWithValue:completion:"); +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt8uWithValue:params:completion:"); +- (void)subscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt8uWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt8uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt16uWithCompletion:"); +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt16uWithValue:completion:"); +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt16uWithValue:params:completion:"); +- (void)subscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt16uWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt16uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt24uWithCompletion:"); +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt24uWithValue:completion:"); +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt24uWithValue:params:completion:"); +- (void)subscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt24uWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt24uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt32uWithCompletion:"); +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt32uWithValue:completion:"); +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt32uWithValue:params:completion:"); +- (void)subscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt32uWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt32uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt40uWithCompletion:"); +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt40uWithValue:completion:"); +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt40uWithValue:params:completion:"); +- (void)subscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt40uWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt40uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt48uWithCompletion:"); +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt48uWithValue:completion:"); +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt48uWithValue:params:completion:"); +- (void)subscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt48uWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt48uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt56uWithCompletion:"); +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt56uWithValue:completion:"); +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt56uWithValue:params:completion:"); +- (void)subscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt56uWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt56uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt64uWithCompletion:"); +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt64uWithValue:completion:"); +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt64uWithValue:params:completion:"); +- (void)subscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt64uWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt64uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt8sWithCompletion:"); +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt8sWithValue:completion:"); +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt8sWithValue:params:completion:"); +- (void)subscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt8sWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt8sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt16sWithCompletion:"); +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt16sWithValue:completion:"); +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt16sWithValue:params:completion:"); +- (void)subscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt16sWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt16sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt24sWithCompletion:"); +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt24sWithValue:completion:"); +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt24sWithValue:params:completion:"); +- (void)subscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt24sWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt24sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt32sWithCompletion:"); +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt32sWithValue:completion:"); +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt32sWithValue:params:completion:"); +- (void)subscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt32sWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt32sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt40sWithCompletion:"); +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt40sWithValue:completion:"); +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt40sWithValue:params:completion:"); +- (void)subscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt40sWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt40sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt48sWithCompletion:"); +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt48sWithValue:completion:"); +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt48sWithValue:params:completion:"); +- (void)subscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt48sWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt48sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt56sWithCompletion:"); +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt56sWithValue:completion:"); +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt56sWithValue:params:completion:"); +- (void)subscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt56sWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt56sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt64sWithCompletion:"); +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt64sWithValue:completion:"); +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeInt64sWithValue:params:completion:"); +- (void)subscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeInt64sWithParams:subscriptionEstablished:"); ++ (void)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeInt64sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnum8WithCompletion:"); +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnum8WithValue:completion:"); +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnum8WithValue:params:completion:"); +- (void)subscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEnum8WithParams:subscriptionEstablished:"); ++ (void)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnum8WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnum16WithCompletion:"); +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnum16WithValue:completion:"); +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnum16WithValue:params:completion:"); +- (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEnum16WithParams:subscriptionEstablished:"); ++ (void)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnum16WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFloatSingleWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFloatSingleWithCompletion:"); +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeFloatSingleWithValue:completion:"); +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeFloatSingleWithValue:params:completion:"); +- (void)subscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFloatSingleWithParams:subscriptionEstablished:"); ++ (void)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFloatSingleWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFloatDoubleWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFloatDoubleWithCompletion:"); +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeFloatDoubleWithValue:completion:"); +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeFloatDoubleWithValue:params:completion:"); +- (void)subscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFloatDoubleWithParams:subscriptionEstablished:"); ++ (void)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFloatDoubleWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeOctetStringWithCompletionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOctetStringWithCompletion:"); +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOctetStringWithValue:completion:"); +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeOctetStringWithValue:params:completion:"); +- (void)subscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeOctetStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeOctetStringWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeListInt8uWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListInt8uWithCompletion:"); +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListInt8uWithValue:completion:"); +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListInt8uWithValue:params:completion:"); +- (void)subscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeListInt8uWithParams:subscriptionEstablished:"); ++ (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListInt8uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeListOctetStringWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListOctetStringWithCompletion:"); +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListOctetStringWithValue:completion:"); +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListOctetStringWithValue:params:completion:"); +- (void)subscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeListOctetStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListOctetStringWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeListStructOctetStringWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListStructOctetStringWithCompletion:"); +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListStructOctetStringWithValue:completion:"); +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListStructOctetStringWithValue:params:completion:"); +- (void)subscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeListStructOctetStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListStructOctetStringWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLongOctetStringWithCompletionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLongOctetStringWithCompletion:"); +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLongOctetStringWithValue:completion:"); +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLongOctetStringWithValue:params:completion:"); +- (void)subscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLongOctetStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLongOctetStringWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeCharStringWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCharStringWithCompletion:"); +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeCharStringWithValue:completion:"); +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeCharStringWithValue:params:completion:"); +- (void)subscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeCharStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeCharStringWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeLongCharStringWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLongCharStringWithCompletion:"); +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLongCharStringWithValue:completion:"); +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeLongCharStringWithValue:params:completion:"); +- (void)subscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeLongCharStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeLongCharStringWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEpochUsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEpochUsWithCompletion:"); +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEpochUsWithValue:completion:"); +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEpochUsWithValue:params:completion:"); +- (void)subscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEpochUsWithParams:subscriptionEstablished:"); ++ (void)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEpochUsWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEpochSWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEpochSWithCompletion:"); +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEpochSWithValue:completion:"); +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEpochSWithValue:params:completion:"); +- (void)subscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEpochSWithParams:subscriptionEstablished:"); ++ (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEpochSWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeVendorIdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorIdWithCompletion:"); +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeVendorIdWithValue:completion:"); +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeVendorIdWithValue:params:completion:"); +- (void)subscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeVendorIdWithParams:subscriptionEstablished:"); ++ (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeVendorIdWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeListNullablesAndOptionalsStructWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListNullablesAndOptionalsStructWithCompletion:"); +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListNullablesAndOptionalsStructWithValue:completion:"); +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListNullablesAndOptionalsStructWithValue:params:completion:"); +- (void)subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeListNullablesAndOptionalsStructWithParams:subscriptionEstablished:"); ++ (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListNullablesAndOptionalsStructWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeEnumAttrWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnumAttrWithCompletion:"); +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnumAttrWithValue:completion:"); +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeEnumAttrWithValue:params:completion:"); +- (void)subscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeEnumAttrWithParams:subscriptionEstablished:"); ++ (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeEnumAttrWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeStructAttrWithCompletionHandler: + (void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStructAttrWithCompletion:"); +- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeStructAttrWithValue:completion:"); +- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeStructAttrWithValue:params:completion:"); +- (void)subscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeStructAttrWithParams:subscriptionEstablished:"); ++ (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeStructAttrWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRangeRestrictedInt8uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRangeRestrictedInt8uWithCompletion:"); +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRangeRestrictedInt8uWithValue:completion:"); +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRangeRestrictedInt8uWithValue:params:completion:"); +- (void)subscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRangeRestrictedInt8uWithParams:subscriptionEstablished:"); ++ (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRangeRestrictedInt8uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRangeRestrictedInt8sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRangeRestrictedInt8sWithCompletion:"); +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRangeRestrictedInt8sWithValue:completion:"); +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRangeRestrictedInt8sWithValue:params:completion:"); +- (void)subscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRangeRestrictedInt8sWithParams:subscriptionEstablished:"); ++ (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRangeRestrictedInt8sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRangeRestrictedInt16uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRangeRestrictedInt16uWithCompletion:"); +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRangeRestrictedInt16uWithValue:completion:"); +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRangeRestrictedInt16uWithValue:params:completion:"); +- (void)subscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRangeRestrictedInt16uWithParams:subscriptionEstablished:"); ++ (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRangeRestrictedInt16uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeRangeRestrictedInt16sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRangeRestrictedInt16sWithCompletion:"); +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRangeRestrictedInt16sWithValue:completion:"); +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeRangeRestrictedInt16sWithValue:params:completion:"); +- (void)subscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeRangeRestrictedInt16sWithParams:subscriptionEstablished:"); ++ (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeRangeRestrictedInt16sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeListLongOctetStringWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListLongOctetStringWithCompletion:"); +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListLongOctetStringWithValue:completion:"); +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListLongOctetStringWithValue:params:completion:"); +- (void)subscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeListLongOctetStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeListLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListLongOctetStringWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListFabricScopedWithParams:completion:"); +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListFabricScopedWithValue:completion:"); +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeListFabricScopedWithValue:params:completion:"); +- (void) + subscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeListFabricScopedWithParams:subscriptionEstablished:"); ++ (void)readAttributeListFabricScopedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeListFabricScopedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeTimedWriteBooleanWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTimedWriteBooleanWithCompletion:"); +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeTimedWriteBooleanWithValue:completion:"); +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeTimedWriteBooleanWithValue:params:completion:"); +- (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeTimedWriteBooleanWithParams:subscriptionEstablished:"); ++ (void)readAttributeTimedWriteBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeTimedWriteBooleanWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneralErrorBooleanWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneralErrorBooleanWithCompletion:"); +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeGeneralErrorBooleanWithValue:completion:"); +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeGeneralErrorBooleanWithValue:params:completion:"); +- (void)subscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneralErrorBooleanWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneralErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneralErrorBooleanWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterErrorBooleanWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterErrorBooleanWithCompletion:"); +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeClusterErrorBooleanWithValue:completion:"); +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeClusterErrorBooleanWithValue:params:completion:"); +- (void)subscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterErrorBooleanWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterErrorBooleanWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeUnsupportedWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnsupportedWithCompletion:"); +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUnsupportedWithValue:completion:"); +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeUnsupportedWithValue:params:completion:"); +- (void)subscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeUnsupportedWithParams:subscriptionEstablished:"); ++ (void)readAttributeUnsupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeUnsupportedWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableBooleanWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableBooleanWithCompletion:"); +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableBooleanWithValue:completion:"); +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableBooleanWithValue:params:completion:"); +- (void)subscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableBooleanWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableBooleanWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableBitmap8WithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableBitmap8WithCompletion:"); +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableBitmap8WithValue:completion:"); +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableBitmap8WithValue:params:completion:"); +- (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableBitmap8WithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableBitmap8WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableBitmap16WithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableBitmap16WithCompletion:"); +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableBitmap16WithValue:completion:"); +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableBitmap16WithValue:params:completion:"); +- (void) + subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableBitmap16WithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableBitmap16WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableBitmap32WithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableBitmap32WithCompletion:"); +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableBitmap32WithValue:completion:"); +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableBitmap32WithValue:params:completion:"); +- (void) + subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableBitmap32WithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableBitmap32WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableBitmap64WithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableBitmap64WithCompletion:"); +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableBitmap64WithValue:completion:"); +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableBitmap64WithValue:params:completion:"); +- (void) + subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableBitmap64WithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableBitmap64WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt8uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt8uWithCompletion:"); +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt8uWithValue:completion:"); +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt8uWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt8uWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt8uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt16uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt16uWithCompletion:"); +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt16uWithValue:completion:"); +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt16uWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt16uWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt16uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt24uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt24uWithCompletion:"); +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt24uWithValue:completion:"); +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt24uWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt24uWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt24uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt32uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt32uWithCompletion:"); +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt32uWithValue:completion:"); +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt32uWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt32uWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt32uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt40uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt40uWithCompletion:"); +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt40uWithValue:completion:"); +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt40uWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt40uWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt40uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt48uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt48uWithCompletion:"); +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt48uWithValue:completion:"); +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt48uWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt48uWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt48uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt56uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt56uWithCompletion:"); +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt56uWithValue:completion:"); +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt56uWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt56uWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt56uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt64uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt64uWithCompletion:"); +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt64uWithValue:completion:"); +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt64uWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt64uWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt64uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt8sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt8sWithCompletion:"); +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt8sWithValue:completion:"); +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt8sWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt8sWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt8sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt16sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt16sWithCompletion:"); +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt16sWithValue:completion:"); +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt16sWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt16sWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt16sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt24sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt24sWithCompletion:"); +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt24sWithValue:completion:"); +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt24sWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt24sWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt24sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt32sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt32sWithCompletion:"); +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt32sWithValue:completion:"); +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt32sWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt32sWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt32sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt40sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt40sWithCompletion:"); +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt40sWithValue:completion:"); +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt40sWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt40sWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt40sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt48sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt48sWithCompletion:"); +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt48sWithValue:completion:"); +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt48sWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt48sWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt48sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt56sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt56sWithCompletion:"); +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt56sWithValue:completion:"); +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt56sWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt56sWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt56sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableInt64sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt64sWithCompletion:"); +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt64sWithValue:completion:"); +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableInt64sWithValue:params:completion:"); +- (void)subscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableInt64sWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableInt64sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableEnum8WithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableEnum8WithCompletion:"); +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableEnum8WithValue:completion:"); +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableEnum8WithValue:params:completion:"); +- (void)subscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableEnum8WithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableEnum8WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableEnum16WithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableEnum16WithCompletion:"); +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableEnum16WithValue:completion:"); +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableEnum16WithValue:params:completion:"); +- (void)subscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableEnum16WithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableEnum16WithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableFloatSingleWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableFloatSingleWithCompletion:"); +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableFloatSingleWithValue:completion:"); +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableFloatSingleWithValue:params:completion:"); +- (void)subscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableFloatSingleWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableFloatSingleWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableFloatDoubleWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableFloatDoubleWithCompletion:"); +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableFloatDoubleWithValue:completion:"); +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableFloatDoubleWithValue:params:completion:"); +- (void)subscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableFloatDoubleWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableFloatDoubleWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableOctetStringWithCompletionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableOctetStringWithCompletion:"); +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableOctetStringWithValue:completion:"); +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableOctetStringWithValue:params:completion:"); +- (void)subscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableOctetStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableOctetStringWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableCharStringWithCompletionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableCharStringWithCompletion:"); +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableCharStringWithValue:completion:"); +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableCharStringWithValue:params:completion:"); +- (void)subscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableCharStringWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableCharStringWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableEnumAttrWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableEnumAttrWithCompletion:"); +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableEnumAttrWithValue:completion:"); +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableEnumAttrWithValue:params:completion:"); +- (void) + subscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableEnumAttrWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableEnumAttrWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableStructWithCompletionHandler: + (void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableStructWithCompletion:"); +- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableStructWithValue:completion:"); +- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableStructWithValue:params:completion:"); +- (void)subscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableStructWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableStructWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableRangeRestrictedInt8uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableRangeRestrictedInt8uWithCompletion:"); +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableRangeRestrictedInt8uWithValue:completion:"); +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableRangeRestrictedInt8uWithValue:params:completion:"); +- (void)subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableRangeRestrictedInt8uWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableRangeRestrictedInt8uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableRangeRestrictedInt8sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableRangeRestrictedInt8sWithCompletion:"); +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableRangeRestrictedInt8sWithValue:completion:"); +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableRangeRestrictedInt8sWithValue:params:completion:"); +- (void)subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableRangeRestrictedInt8sWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableRangeRestrictedInt8sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableRangeRestrictedInt16uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableRangeRestrictedInt16uWithCompletion:"); +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableRangeRestrictedInt16uWithValue:completion:"); +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableRangeRestrictedInt16uWithValue:params:completion:"); +- (void)subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableRangeRestrictedInt16uWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableRangeRestrictedInt16uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeNullableRangeRestrictedInt16sWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableRangeRestrictedInt16sWithCompletion:"); +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableRangeRestrictedInt16sWithValue:completion:"); +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use writeAttributeNullableRangeRestrictedInt16sWithValue:params:completion:"); +- (void)subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeNullableRangeRestrictedInt16sWithParams:subscriptionEstablished:"); ++ (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeNullableRangeRestrictedInt16sWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeWriteOnlyInt8uWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) + MTR_NEWLY_DEPRECATED("Please use readAttributeWriteOnlyInt8uWithCompletion:"); +- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler + API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) + MTR_NEWLY_DEPRECATED("Please use writeAttributeWriteOnlyInt8uWithValue:completion:"); +- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler + API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) + MTR_NEWLY_DEPRECATED("Please use writeAttributeWriteOnlyInt8uWithValue:params:completion:"); +- (void)subscribeAttributeWriteOnlyInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeWriteOnlyInt8uWithParams:subscriptionEstablished:"); ++ (void)readAttributeWriteOnlyInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) + MTR_NEWLY_DEPRECATED("Please use readAttributeWriteOnlyInt8uWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:"); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:"); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeAttributeListWithCompletionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithCompletion:"); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:"); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeFeatureMapWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:"); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:"); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:"); + +- (void)readAttributeClusterRevisionWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:"); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_NEWLY_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:"); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:"); + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index b95091924f0ba4..631155fa760a9d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -53,14 +53,14 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -80,15 +80,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -111,10 +110,9 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeIdentifyTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -124,13 +122,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -139,7 +137,7 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -162,11 +160,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -192,16 +191,15 @@ - (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; @@ -220,10 +218,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeIdentifyTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -233,11 +230,12 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -263,16 +261,15 @@ - (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; @@ -291,10 +288,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -304,13 +300,13 @@ new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(self.callbackQueu }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -337,17 +333,17 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; @@ -366,10 +362,9 @@ new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -379,13 +374,12 @@ new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -412,39 +406,37 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRIdentifyAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRIdentifyAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -454,11 +446,12 @@ new MTRIdentifyAttributeListListAttributeCallbackBridge(self.callbackQueue, self }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -485,39 +478,36 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRIdentifyAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRIdentifyAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -527,11 +517,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -557,15 +548,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; @@ -584,10 +575,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -597,12 +587,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -628,16 +618,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; @@ -660,6 +649,233 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterIdentify (Deprecated) +- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self identifyWithParams:params completion:completionHandler]; +} +- (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self triggerEffectWithParams:params completion:completionHandler]; +} + +- (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeIdentifyTimeWithCompletion:completionHandler]; +} +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeIdentifyTimeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeIdentifyTimeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeIdentifyTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeIdentifyTimeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeIdentifyTypeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeIdentifyTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeIdentifyTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -683,12 +899,11 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en } - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params - completionHandler: - (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -709,12 +924,12 @@ new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, self.devi } - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params - completionHandler: - (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -734,12 +949,12 @@ new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, self.dev } - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params - completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -780,12 +995,12 @@ new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, } - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params - completionHandler: - (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -804,19 +1019,19 @@ new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, self.d }); } -- (void)removeAllGroupsWithCompletionHandler:(StatusCompletion)completionHandler +- (void)removeAllGroupsWithCompletion:(MTRStatusCompletion)completion { - [self removeAllGroupsWithParams:nil completionHandler:completionHandler]; + [self removeAllGroupsWithParams:nil completion:completion]; } - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -836,14 +1051,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -864,10 +1079,9 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -877,11 +1091,12 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -907,16 +1122,15 @@ - (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInt params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; @@ -935,10 +1149,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGroupsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGroupsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -948,13 +1161,13 @@ new MTRGroupsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -981,39 +1194,37 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGroupsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRGroupsGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGroupsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGroupsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1023,13 +1234,12 @@ new MTRGroupsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -1056,39 +1266,37 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGroupsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRGroupsAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGroupsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGroupsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1098,11 +1306,12 @@ new MTRGroupsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -1129,16 +1338,15 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGroupsAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRGroupsAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; @@ -1157,10 +1365,9 @@ new MTRGroupsAttributeListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1170,11 +1377,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -1200,15 +1408,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; @@ -1227,10 +1435,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1240,12 +1447,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -1271,16 +1478,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; @@ -1303,6 +1509,223 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterGroups (Deprecated) +- (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params + completionHandler: + (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self addGroupWithParams:params completion:completionHandler]; +} +- (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params + completionHandler: + (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self viewGroupWithParams:params completion:completionHandler]; +} +- (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params + completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getGroupMembershipWithParams:params completion:completionHandler]; +} +- (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params + completionHandler: + (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self removeGroupWithParams:params completion:completionHandler]; +} +- (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self removeAllGroupsWithParams:params completion:completionHandler]; +} +- (void)removeAllGroupsWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self removeAllGroupsWithParams:nil completion:completionHandler]; +} +- (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self addGroupIfIdentifyingWithParams:params completion:completionHandler]; +} + +- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNameSupportWithCompletion:completionHandler]; +} +- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNameSupportWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNameSupportWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -1326,12 +1749,11 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en } - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1427,12 +1849,12 @@ new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, self.devi } - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1453,12 +1875,12 @@ new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, self.dev } - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1479,12 +1901,12 @@ new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, self.d } - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params - completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1504,12 +1926,12 @@ new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, se } - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1529,14 +1951,14 @@ new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, self.de }); } -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -1567,12 +1989,12 @@ new MTRCommandSuccessCallbackBridge( } - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params - completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1592,12 +2014,12 @@ new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, } - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params - completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1693,12 +2115,12 @@ new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, s } - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params - completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1719,12 +2141,12 @@ new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, } - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1747,10 +2169,9 @@ new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, self.dev }); } -- (void)readAttributeSceneCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1760,11 +2181,12 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -1790,15 +2212,15 @@ - (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; @@ -1817,10 +2239,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1830,11 +2251,12 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -1860,16 +2282,15 @@ - (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; @@ -1888,10 +2309,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1901,11 +2321,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -1931,16 +2352,15 @@ - (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; @@ -1959,10 +2379,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeSceneValidWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -1972,11 +2391,12 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -2002,15 +2422,15 @@ - (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; @@ -2029,10 +2449,9 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2042,11 +2461,12 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -2072,16 +2492,15 @@ - (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInt params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; @@ -2100,10 +2519,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeLastConfiguredByWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2113,12 +2531,12 @@ new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -2145,16 +2563,15 @@ - (void)subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)m params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; @@ -2173,10 +2590,9 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRScenesGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2186,13 +2602,13 @@ new MTRScenesGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -2219,39 +2635,37 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRScenesGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRScenesGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRScenesAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2261,13 +2675,12 @@ new MTRScenesAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -2294,39 +2707,37 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRScenesAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRScenesAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRScenesAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRScenesAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2336,11 +2747,12 @@ new MTRScenesAttributeListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -2367,16 +2779,15 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRScenesAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRScenesAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; @@ -2395,10 +2806,9 @@ new MTRScenesAttributeListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2408,11 +2818,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -2438,15 +2849,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; @@ -2465,10 +2876,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2478,12 +2888,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -2509,16 +2919,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; @@ -2541,6 +2950,387 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterScenes (Deprecated) +- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self addSceneWithParams:params completion:completionHandler]; +} +- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self viewSceneWithParams:params completion:completionHandler]; +} +- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self removeSceneWithParams:params completion:completionHandler]; +} +- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params + completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self removeAllScenesWithParams:params completion:completionHandler]; +} +- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self storeSceneWithParams:params completion:completionHandler]; +} +- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self recallSceneWithParams:params completion:completionHandler]; +} +- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params + completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getSceneMembershipWithParams:params completion:completionHandler]; +} +- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params + completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self enhancedAddSceneWithParams:params completion:completionHandler]; +} +- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params + completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self enhancedViewSceneWithParams:params completion:completionHandler]; +} +- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params + completionHandler: + (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self copySceneWithParams:params completion:completionHandler]; +} + +- (void)readAttributeSceneCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSceneCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSceneCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSceneCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentSceneWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentSceneWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentSceneWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentGroupWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentGroupWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentGroupWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSceneValidWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSceneValidWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSceneValidWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSceneValidWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNameSupportWithCompletion:completionHandler]; +} +- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNameSupportWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNameSupportWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLastConfiguredByWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLastConfiguredByWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLastConfiguredByWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastConfiguredByWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -2563,18 +3353,18 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)offWithCompletionHandler:(StatusCompletion)completionHandler +- (void)offWithCompletion:(MTRStatusCompletion)completion { - [self offWithParams:nil completionHandler:completionHandler]; + [self offWithParams:nil completion:completion]; } -- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2593,18 +3383,18 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)onWithCompletionHandler:(StatusCompletion)completionHandler +- (void)onWithCompletion:(MTRStatusCompletion)completion { - [self onWithParams:nil completionHandler:completionHandler]; + [self onWithParams:nil completion:completion]; } -- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2623,18 +3413,18 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)toggleWithCompletionHandler:(StatusCompletion)completionHandler +- (void)toggleWithCompletion:(MTRStatusCompletion)completion { - [self toggleWithParams:nil completionHandler:completionHandler]; + [self toggleWithParams:nil completion:completion]; } -- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2653,14 +3443,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2682,19 +3472,19 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)onWithRecallGlobalSceneWithCompletionHandler:(StatusCompletion)completionHandler +- (void)onWithRecallGlobalSceneWithCompletion:(MTRStatusCompletion)completion { - [self onWithRecallGlobalSceneWithParams:nil completionHandler:completionHandler]; + [self onWithRecallGlobalSceneWithParams:nil completion:completion]; } - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2713,14 +3503,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -2743,9 +3533,9 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2755,11 +3545,11 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -2785,15 +3575,15 @@ - (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; @@ -2812,10 +3602,9 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2825,12 +3614,12 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -2856,16 +3645,16 @@ - (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; @@ -2884,9 +3673,9 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOnTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -2896,13 +3685,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOnTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeOnTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -2911,7 +3700,7 @@ - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -2934,11 +3723,11 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -2964,15 +3753,15 @@ - (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; @@ -2991,10 +3780,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3004,13 +3792,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3019,7 +3807,7 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -3042,11 +3830,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3072,16 +3861,15 @@ - (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInt params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; @@ -3100,10 +3888,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3113,13 +3900,13 @@ new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(self.callbac }); } -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3128,7 +3915,7 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -3156,11 +3943,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3187,17 +3975,16 @@ - (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; @@ -3216,10 +4003,9 @@ new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROnOffGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTROnOffGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3229,13 +4015,13 @@ new MTROnOffGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3262,39 +4048,37 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROnOffGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTROnOffGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROnOffAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTROnOffAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3304,13 +4088,12 @@ new MTROnOffAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3337,39 +4120,37 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROnOffAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTROnOffAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROnOffAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTROnOffAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3379,11 +4160,12 @@ new MTROnOffAttributeListListAttributeCallbackBridge(self.callbackQueue, self.de }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3410,16 +4192,15 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROnOffAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTROnOffAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; @@ -3438,10 +4219,9 @@ new MTROnOffAttributeListListAttributeCallbackBridge(queue, completionHandler, ^ }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3451,11 +4231,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3481,15 +4262,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; @@ -3508,10 +4289,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3521,12 +4301,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3552,16 +4332,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; @@ -3584,6 +4363,366 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterOnOff (Deprecated) +- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self offWithParams:params completion:completionHandler]; +} +- (void)offWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self offWithParams:nil completion:completionHandler]; +} +- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self onWithParams:params completion:completionHandler]; +} +- (void)onWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self onWithParams:nil completion:completionHandler]; +} +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self toggleWithParams:params completion:completionHandler]; +} +- (void)toggleWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self toggleWithParams:nil completion:completionHandler]; +} +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self offWithEffectWithParams:params completion:completionHandler]; +} +- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self onWithRecallGlobalSceneWithParams:params completion:completionHandler]; +} +- (void)onWithRecallGlobalSceneWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self onWithRecallGlobalSceneWithParams:nil completion:completionHandler]; +} +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self onWithTimedOffWithParams:params completion:completionHandler]; +} + +- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnOffWithCompletion:completionHandler]; +} +- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOnOffWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnOffWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGlobalSceneControlWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGlobalSceneControlWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGlobalSceneControlWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnTimeWithCompletion:completionHandler]; +} +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnTimeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnTimeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOnTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnTimeWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOffWaitTimeWithCompletion:completionHandler]; +} +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOffWaitTimeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOffWaitTimeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOffWaitTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOffWaitTimeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpOnOffWithCompletion:completionHandler]; +} +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpOnOffWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpOnOffWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeStartUpOnOffWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpOnOffWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -3606,10 +4745,9 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3619,11 +4757,12 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3649,15 +4788,15 @@ - (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; @@ -3676,10 +4815,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3689,13 +4827,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3704,7 +4842,7 @@ - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -3727,12 +4865,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3758,16 +4896,15 @@ - (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; @@ -3786,11 +4923,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3800,13 +4935,13 @@ new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(s }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3836,17 +4971,17 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; @@ -3866,11 +5001,9 @@ new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3880,13 +5013,12 @@ new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(se }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3916,17 +5048,17 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; @@ -3946,10 +5078,9 @@ new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -3959,11 +5090,12 @@ new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(self.cal }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -3991,17 +5123,16 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; @@ -4020,10 +5151,9 @@ new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4033,11 +5163,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -4063,15 +5194,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; @@ -4090,10 +5221,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4103,12 +5233,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -4134,16 +5264,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; @@ -4166,6 +5295,223 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterOnOffSwitchConfiguration (Deprecated) +- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSwitchTypeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSwitchTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSwitchTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSwitchActionsWithCompletion:completionHandler]; +} +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSwitchActionsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSwitchActionsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSwitchActionsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSwitchActionsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -4188,15 +5534,14 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -4224,14 +5569,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -4259,14 +5604,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -4295,14 +5640,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -4324,14 +5669,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -4359,15 +5704,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -4395,15 +5739,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -4432,15 +5775,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -4462,14 +5804,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -4489,10 +5831,9 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4502,11 +5843,12 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -4533,16 +5875,15 @@ - (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; @@ -4561,10 +5902,9 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4574,12 +5914,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -4605,16 +5945,15 @@ - (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; @@ -4633,10 +5972,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4646,11 +5984,11 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -4676,15 +6014,15 @@ - (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterv params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; @@ -4703,10 +6041,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4716,11 +6053,11 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -4746,15 +6083,15 @@ - (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterv params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; @@ -4773,10 +6110,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4786,12 +6122,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -4817,16 +6153,15 @@ - (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)m params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; @@ -4845,10 +6180,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4858,11 +6192,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -4888,16 +6223,15 @@ - (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; @@ -4916,10 +6250,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4929,11 +6262,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -4959,16 +6293,15 @@ - (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; @@ -4987,9 +6320,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::Options::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -4999,13 +6332,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -5014,7 +6347,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5037,11 +6370,11 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -5067,15 +6400,15 @@ - (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterva params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::Options::TypeInfo; @@ -5094,10 +6427,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5107,13 +6439,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -5122,7 +6454,7 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5145,13 +6477,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -5177,16 +6508,16 @@ - (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; @@ -5205,9 +6536,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeOnLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5217,13 +6548,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOnLevelWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeOnLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -5232,7 +6563,7 @@ - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5260,11 +6591,11 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -5291,15 +6622,15 @@ - (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterva params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; @@ -5318,10 +6649,9 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5331,13 +6661,13 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -5346,7 +6676,7 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5374,12 +6704,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -5406,16 +6736,15 @@ - (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)m params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; @@ -5434,10 +6763,9 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5447,13 +6775,13 @@ new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -5462,7 +6790,7 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5490,12 +6818,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -5522,16 +6850,15 @@ - (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull) params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; @@ -5550,10 +6877,9 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5563,13 +6889,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -5578,7 +6904,7 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5606,12 +6932,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -5638,16 +6964,15 @@ - (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; @@ -5666,10 +6991,9 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeStartUpCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5679,13 +7003,13 @@ new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, com }); } -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -5694,7 +7018,7 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -5722,13 +7046,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -5755,16 +7078,16 @@ - (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; @@ -5783,10 +7106,9 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5796,13 +7118,13 @@ new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -5829,17 +7151,17 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; @@ -5858,10 +7180,9 @@ new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5871,13 +7192,12 @@ new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQ }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -5904,17 +7224,17 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; @@ -5933,10 +7253,9 @@ new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLevelControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRLevelControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -5946,11 +7265,12 @@ new MTRLevelControlAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -5977,39 +7297,36 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLevelControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRLevelControlAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6019,11 +7336,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -6049,15 +7367,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; @@ -6076,10 +7394,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6089,12 +7406,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -6120,16 +7437,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; @@ -6152,305 +7468,761 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterLevelControl (Deprecated) -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self moveToLevelWithParams:params completion:completionHandler]; } - -@end - -@implementation MTRBaseClusterBinaryInputBasic - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self moveWithParams:params completion:completionHandler]; } - -- (void)readAttributeActiveTextWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self stepWithParams:params completion:completionHandler]; } - -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeActiveTextWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self stopWithParams:params completion:completionHandler]; } -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self moveToLevelWithOnOffWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self moveWithOnOffWithParams:params completion:completionHandler]; } - -+ (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self stepWithOnOffWithParams:params completion:completionHandler]; } - -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self stopWithOnOffWithParams:params completion:completionHandler]; +} +- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToClosestFrequencyWithParams:params completion:completionHandler]; } -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeDescriptionWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeCurrentLevelWithCompletion:completionHandler]; } -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeCurrentLevelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeCurrentLevelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRemainingTimeWithCompletion:completionHandler]; } - -- (void)readAttributeInactiveTextWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeRemainingTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRemainingTimeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeInactiveTextWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeMinLevelWithCompletion:completionHandler]; } -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeMinLevelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. + [self readAttributeMinLevelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxLevelWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxLevelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxLevelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentFrequencyWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentFrequencyWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentFrequencyWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinFrequencyWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMinFrequencyWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinFrequencyWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxFrequencyWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxFrequencyWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxFrequencyWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOptionsWithCompletion:completionHandler]; +} +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOptionsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOptionsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOptionsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOptionsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeOnOffTransitionTimeWithCompletion:completionHandler]; +} +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnOffTransitionTimeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnOffTransitionTimeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOnOffTransitionTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnOffTransitionTimeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOnLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnLevelWithCompletion:completionHandler]; +} +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnLevelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnLevelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOnLevelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnLevelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeOnTransitionTimeWithCompletion:completionHandler]; +} +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnTransitionTimeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnTransitionTimeWithValue:value params:params completion:completionHandler]; +} +- (void) + subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOnTransitionTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnTransitionTimeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeOffTransitionTimeWithCompletion:completionHandler]; +} +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOffTransitionTimeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOffTransitionTimeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOffTransitionTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOffTransitionTimeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeDefaultMoveRateWithCompletion:completionHandler]; +} +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDefaultMoveRateWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDefaultMoveRateWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDefaultMoveRateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDefaultMoveRateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpCurrentLevelWithCompletion:completionHandler]; +} +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpCurrentLevelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpCurrentLevelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeStartUpCurrentLevelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpCurrentLevelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterBinaryInputBasic + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeActiveTextWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; @@ -6462,7 +8234,7 @@ - (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minIn // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -6475,19 +8247,18 @@ - (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -6503,26 +8274,25 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeDescriptionWithValue:(NSString * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -6531,7 +8301,7 @@ - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -6542,9 +8312,9 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.boolValue; + cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -6554,55 +8324,56 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -6612,28 +8383,244 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributePolarityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInactiveTextWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, @@ -6655,15 +8642,15 @@ - (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterv params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; @@ -6682,10 +8669,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributePresentValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6695,13 +8681,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributePresentValueWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributePresentValueWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -6710,7 +8696,7 @@ - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -6733,11 +8719,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -6763,16 +8750,15 @@ - (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; @@ -6791,10 +8777,9 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeReliabilityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6804,13 +8789,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeReliabilityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeReliabilityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -6819,7 +8804,7 @@ - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -6842,11 +8827,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -6872,16 +8858,15 @@ - (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInt params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; @@ -6900,10 +8885,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6913,11 +8897,12 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionH }); } -- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -6943,16 +8928,15 @@ - (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInt params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; @@ -6971,10 +8955,9 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -6984,12 +8967,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7015,16 +8998,15 @@ - (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; @@ -7043,10 +9025,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7056,13 +9037,13 @@ new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(self.call }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7090,17 +9071,17 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; @@ -7119,10 +9100,9 @@ new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7132,13 +9112,12 @@ new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(self.callb }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7166,17 +9145,17 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; @@ -7195,10 +9174,9 @@ new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7208,11 +9186,12 @@ new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7239,17 +9218,16 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; @@ -7268,10 +9246,9 @@ new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7281,11 +9258,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7311,15 +9289,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; @@ -7338,10 +9316,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7351,12 +9328,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7382,16 +9359,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; @@ -7414,6 +9390,475 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterBinaryInputBasic (Deprecated) +- (void)readAttributeActiveTextWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveTextWithCompletion:completionHandler]; +} +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveTextWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveTextWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveTextWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveTextWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDescriptionWithCompletion:completionHandler]; +} +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDescriptionWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDescriptionWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDescriptionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDescriptionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeInactiveTextWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInactiveTextWithCompletion:completionHandler]; +} +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInactiveTextWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInactiveTextWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInactiveTextWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInactiveTextWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOutOfServiceWithCompletion:completionHandler]; +} +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOutOfServiceWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOutOfServiceWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOutOfServiceWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOutOfServiceWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePolarityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePolarityWithCompletion:completionHandler]; +} +- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePolarityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePolarityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePresentValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePresentValueWithCompletion:completionHandler]; +} +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePresentValueWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePresentValueWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePresentValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePresentValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeReliabilityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReliabilityWithCompletion:completionHandler]; +} +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeReliabilityWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeReliabilityWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeReliabilityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReliabilityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStatusFlagsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeStatusFlagsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStatusFlagsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeApplicationTypeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeApplicationTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApplicationTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -7436,10 +9881,9 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributeDeviceListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorDeviceTypeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDescriptorDeviceTypeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7449,11 +9893,12 @@ new MTRDescriptorDeviceTypeListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeDeviceTypeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7480,38 +9925,36 @@ - (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDeviceListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDeviceTypeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorDeviceTypeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRDescriptorDeviceTypeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeServerListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorServerListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDescriptorServerListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7521,11 +9964,11 @@ new MTRDescriptorServerListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7552,15 +9995,15 @@ - (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorServerListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRDescriptorServerListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; @@ -7579,10 +10022,9 @@ new MTRDescriptorServerListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeClientListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorClientListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDescriptorClientListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7592,11 +10034,11 @@ new MTRDescriptorClientListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7623,15 +10065,15 @@ - (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorClientListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRDescriptorClientListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; @@ -7650,10 +10092,9 @@ new MTRDescriptorClientListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributePartsListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorPartsListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDescriptorPartsListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7663,11 +10104,11 @@ new MTRDescriptorPartsListListAttributeCallbackBridge(self.callbackQueue, self.d }); } -- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7694,15 +10135,15 @@ - (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInter params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorPartsListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRDescriptorPartsListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; @@ -7721,10 +10162,9 @@ new MTRDescriptorPartsListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7734,13 +10174,13 @@ new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(self.callbackQu }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7767,17 +10207,17 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; @@ -7796,10 +10236,9 @@ new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7809,13 +10248,12 @@ new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(self.callbackQue }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7842,17 +10280,17 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; @@ -7871,10 +10309,9 @@ new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDescriptorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7884,11 +10321,12 @@ new MTRDescriptorAttributeListListAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7915,39 +10353,36 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDescriptorAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRDescriptorAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -7957,11 +10392,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -7987,15 +10423,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; @@ -8014,10 +10450,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8027,12 +10462,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -8058,16 +10493,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; @@ -8090,33 +10524,294 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterDescriptor (Deprecated) -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeDeviceListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeDeviceTypeListWithCompletion:completionHandler]; } - -@end - -@implementation MTRBaseClusterBinding - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self NewsubscribeAttributeDeviceTypeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - ++ (void)readAttributeDeviceListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDeviceTypeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeServerListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeServerListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeServerListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeServerListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClientListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClientListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClientListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClientListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePartsListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartsListWithCompletion:completionHandler]; +} +- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePartsListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartsListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterBinding + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + - (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRBindingBindingListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBindingBindingListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::Binding::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8127,13 +10822,13 @@ new MTRBindingBindingListAttributeCallbackBridge(self.callbackQueue, self.device }); } -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBindingWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeBindingWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -8142,7 +10837,7 @@ - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -8202,11 +10897,11 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -8233,15 +10928,15 @@ - (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterva params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBindingBindingListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBindingBindingListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Binding::Attributes::Binding::TypeInfo; @@ -8260,10 +10955,9 @@ new MTRBindingBindingListAttributeCallbackBridge(queue, completionHandler, ^(Can }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBindingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBindingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8273,13 +10967,13 @@ new MTRBindingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -8306,39 +11000,37 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBindingGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRBindingGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBindingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBindingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8348,13 +11040,12 @@ new MTRBindingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -8381,39 +11072,37 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBindingAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRBindingAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBindingAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBindingAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8423,11 +11112,12 @@ new MTRBindingAttributeListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -8454,16 +11144,15 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBindingAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBindingAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; @@ -8482,10 +11171,9 @@ new MTRBindingAttributeListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8495,11 +11183,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -8525,15 +11214,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; @@ -8552,10 +11241,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8565,12 +11253,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -8596,16 +11284,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; @@ -8628,6 +11315,193 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterBinding (Deprecated) +- (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBindingWithParams:params completion:completionHandler]; +} +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBindingWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBindingWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBindingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBindingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -8651,10 +11525,10 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en } - (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRAccessControlAclListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRAccessControlAclListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8665,13 +11539,13 @@ new MTRAccessControlAclListAttributeCallbackBridge(self.callbackQueue, self.devi }); } -- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeAclWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeAclWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -8680,7 +11554,7 @@ - (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -8801,11 +11675,11 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -8832,15 +11706,15 @@ - (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRAccessControlAclListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRAccessControlAclListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; @@ -8860,10 +11734,10 @@ new MTRAccessControlAclListAttributeCallbackBridge(queue, completionHandler, ^(C } - (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRAccessControlExtensionListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRAccessControlExtensionListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -8874,13 +11748,13 @@ new MTRAccessControlExtensionListAttributeCallbackBridge(self.callbackQueue, sel }); } -- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeExtensionWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeExtensionWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -8889,7 +11763,7 @@ - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -8934,11 +11808,11 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -8965,38 +11839,37 @@ - (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInter params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRAccessControlExtensionListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRAccessControlExtensionListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9006,13 +11879,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -9038,16 +11911,16 @@ - (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; @@ -9066,10 +11939,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTargetsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9079,13 +11952,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -9111,16 +11984,16 @@ - (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; @@ -9139,10 +12012,10 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAccessControlEntriesPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9152,15 +12025,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. +- (void)NewsubscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; @@ -9184,16 +12057,16 @@ - (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; @@ -9212,10 +12085,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9225,13 +12097,13 @@ new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(self.callbac }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -9258,17 +12130,17 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; @@ -9287,10 +12159,9 @@ new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9300,13 +12171,12 @@ new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(self.callback }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -9333,17 +12203,17 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; @@ -9362,10 +12232,9 @@ new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRAccessControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRAccessControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9375,11 +12244,12 @@ new MTRAccessControlAttributeListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -9406,39 +12276,36 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRAccessControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRAccessControlAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9448,11 +12315,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -9478,15 +12346,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; @@ -9505,10 +12373,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9518,12 +12385,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -9549,16 +12416,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; @@ -9581,6 +12447,321 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterAccessControl (Deprecated) +- (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAclWithParams:params completion:completionHandler]; +} +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAclWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAclWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAclWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAclWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeExtensionWithParams:params completion:completionHandler]; +} +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeExtensionWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeExtensionWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeExtensionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeExtensionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSubjectsPerAccessControlEntryWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSubjectsPerAccessControlEntryWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeTargetsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTargetsPerAccessControlEntryWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTargetsPerAccessControlEntryWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTargetsPerAccessControlEntryWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAccessControlEntriesPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAccessControlEntriesPerFabricWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAccessControlEntriesPerFabricWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAccessControlEntriesPerFabricWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -9603,14 +12784,14 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9635,14 +12816,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9667,14 +12848,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9699,14 +12880,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9731,14 +12912,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9762,14 +12943,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9794,14 +12975,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9826,14 +13007,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9857,14 +13038,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9889,14 +13070,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9921,14 +13102,14 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9953,14 +13134,14 @@ new MTRCommandSuccessCallbackBridge( } - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -9985,10 +13166,9 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeActionListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRActionsActionListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRActionsActionListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::ActionList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -9998,11 +13178,11 @@ new MTRActionsActionListListAttributeCallbackBridge(self.callbackQueue, self.dev }); } -- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10029,15 +13209,15 @@ - (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRActionsActionListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRActionsActionListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::ActionList::TypeInfo; @@ -10056,10 +13236,9 @@ new MTRActionsActionListListAttributeCallbackBridge(queue, completionHandler, ^( }); } -- (void)readAttributeEndpointListsWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRActionsEndpointListsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRActionsEndpointListsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10069,11 +13248,12 @@ new MTRActionsEndpointListsListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10100,16 +13280,15 @@ - (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRActionsEndpointListsListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRActionsEndpointListsListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; @@ -10128,10 +13307,9 @@ new MTRActionsEndpointListsListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeSetupURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10141,11 +13319,11 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10172,15 +13350,15 @@ - (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterv params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; @@ -10199,10 +13377,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRActionsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRActionsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10212,13 +13389,13 @@ new MTRActionsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10245,39 +13422,37 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRActionsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRActionsGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRActionsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRActionsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10287,13 +13462,12 @@ new MTRActionsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10320,39 +13494,37 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRActionsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRActionsAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRActionsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRActionsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10362,11 +13534,12 @@ new MTRActionsAttributeListListAttributeCallbackBridge(self.callbackQueue, self. }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10393,16 +13566,15 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRActionsAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRActionsAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; @@ -10421,10 +13593,9 @@ new MTRActionsAttributeListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10434,11 +13605,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10464,15 +13636,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; @@ -10491,10 +13663,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10504,12 +13675,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10535,16 +13706,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; @@ -10567,6 +13737,298 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterActions (Deprecated) +- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self instantActionWithParams:params completion:completionHandler]; +} +- (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self instantActionWithTransitionWithParams:params completion:completionHandler]; +} +- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self startActionWithParams:params completion:completionHandler]; +} +- (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self startActionWithDurationWithParams:params completion:completionHandler]; +} +- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stopActionWithParams:params completion:completionHandler]; +} +- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self pauseActionWithParams:params completion:completionHandler]; +} +- (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self pauseActionWithDurationWithParams:params completion:completionHandler]; +} +- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resumeActionWithParams:params completion:completionHandler]; +} +- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enableActionWithParams:params completion:completionHandler]; +} +- (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enableActionWithDurationWithParams:params completion:completionHandler]; +} +- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self disableActionWithParams:params completion:completionHandler]; +} +- (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self disableActionWithDurationWithParams:params completion:completionHandler]; +} + +- (void)readAttributeActionListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActionListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActionListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActionListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeEndpointListsWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEndpointListsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeEndpointListsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEndpointListsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSetupURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSetupURLWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSetupURLWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSetupURLWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -10589,19 +14051,19 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)mfgSpecificPingWithCompletionHandler:(StatusCompletion)completionHandler +- (void)mfgSpecificPingWithCompletion:(MTRStatusCompletion)completion { - [self mfgSpecificPingWithParams:nil completionHandler:completionHandler]; + [self mfgSpecificPingWithParams:nil completion:completion]; } - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; @@ -10620,10 +14082,9 @@ new MTRCommandSuccessCallbackBridge( }); } -- (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10633,12 +14094,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10664,16 +14125,15 @@ - (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull) params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; @@ -10692,10 +14152,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::VendorName::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10705,11 +14164,12 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10736,15 +14196,15 @@ - (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::VendorName::TypeInfo; @@ -10763,10 +14223,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::VendorID::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10776,11 +14235,11 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completi }); } -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10806,15 +14265,15 @@ - (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterv params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::VendorID::TypeInfo; @@ -10833,10 +14292,9 @@ new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeProductNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductName::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10846,11 +14304,12 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10877,16 +14336,15 @@ - (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInt params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ProductName::TypeInfo; @@ -10905,10 +14363,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeProductIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductID::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10918,11 +14375,11 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -10948,15 +14405,15 @@ - (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInter params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ProductID::TypeInfo; @@ -10975,10 +14432,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -10988,13 +14444,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -11003,7 +14459,7 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -11026,11 +14482,11 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11057,15 +14513,15 @@ - (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInter params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; @@ -11084,10 +14540,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeLocationWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLocationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::Location::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11097,13 +14552,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLocationWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeLocationWithValue:(NSString * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -11112,7 +14567,7 @@ - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -11135,11 +14590,11 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11166,15 +14621,15 @@ - (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterv params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::Location::TypeInfo; @@ -11193,10 +14648,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11206,12 +14660,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11237,16 +14691,15 @@ - (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; @@ -11265,10 +14718,9 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11278,13 +14730,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11311,16 +14763,16 @@ - (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; @@ -11339,10 +14791,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11352,12 +14803,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11383,16 +14834,15 @@ - (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; @@ -11411,10 +14861,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11424,13 +14873,13 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11457,16 +14906,16 @@ - (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; @@ -11485,10 +14934,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11498,12 +14946,12 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11530,16 +14978,15 @@ - (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull) params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; @@ -11558,10 +15005,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributePartNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11571,11 +15017,12 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11602,15 +15049,15 @@ - (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; @@ -11629,10 +15076,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeProductURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11642,11 +15088,12 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11673,15 +15120,15 @@ - (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; @@ -11700,10 +15147,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11713,11 +15159,12 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11744,16 +15191,15 @@ - (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; @@ -11772,10 +15218,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11785,11 +15230,12 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11816,16 +15262,15 @@ - (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; @@ -11844,10 +15289,9 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11857,13 +15301,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -11872,7 +15316,7 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -11895,13 +15339,12 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11927,16 +15370,16 @@ - (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; @@ -11955,10 +15398,9 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeReachableWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::Reachable::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -11968,11 +15410,11 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completio }); } -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -11998,15 +15440,15 @@ - (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInter params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::Reachable::TypeInfo; @@ -12025,10 +15467,9 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12038,11 +15479,11 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, comple }); } -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -12069,15 +15510,15 @@ - (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterv params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; @@ -12096,10 +15537,10 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completion { - new MTRBasicCapabilityMinimaStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBasicCapabilityMinimaStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12109,12 +15550,12 @@ new MTRBasicCapabilityMinimaStructAttributeCallbackBridge(self.callbackQueue, se }); } -- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -12141,39 +15582,37 @@ - (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)m params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completion { - new MTRBasicCapabilityMinimaStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRBasicCapabilityMinimaStructAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12183,13 +15622,13 @@ new MTRBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -12216,39 +15655,37 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRBasicGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12258,13 +15695,12 @@ new MTRBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, s }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -12291,39 +15727,37 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRBasicAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12333,11 +15767,12 @@ new MTRBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.de }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -12364,16 +15799,15 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBasicAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBasicAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; @@ -12392,10 +15826,9 @@ new MTRBasicAttributeListListAttributeCallbackBridge(queue, completionHandler, ^ }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12405,11 +15838,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -12435,15 +15869,15 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; @@ -12462,10 +15896,9 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); @@ -12475,12 +15908,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -12506,16 +15939,15 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; @@ -12538,528 +15970,780 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @implementation MTRBaseClusterBasic (Deprecated) -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self mfgSpecificPingWithParams:params completion:completionHandler]; } - -@end - -@implementation MTRBaseClusterOtaSoftwareUpdateProvider - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)mfgSpecificPingWithCompletionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self mfgSpecificPingWithParams:nil completion:completionHandler]; } -- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params - completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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]; - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributeDataModelRevisionWithCompletion:completionHandler]; } - -- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params - completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.updateToken = [self asByteSpan:params.updateToken]; - request.newVersion = params.newVersion.unsignedIntValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self NewsubscribeAttributeDataModelRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.updateToken = [self asByteSpan:params.updateToken]; - request.softwareVersion = params.softwareVersion.unsignedIntValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributeDataModelRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeVendorNameWithCompletion:completionHandler]; } - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeVendorNameWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeVendorNameWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeVendorIDWithCompletion:completionHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeVendorIDWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeVendorIDWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeProductNameWithCompletion:completionHandler]; } - -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeProductNameWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeProductNameWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeProductIDWithCompletion:completionHandler]; } - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeProductIDWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeProductIDWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNodeLabelWithCompletion:completionHandler]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNodeLabelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNodeLabelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNodeLabelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNodeLabelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)readAttributeLocationWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLocationWithCompletion:completionHandler]; +} +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLocationWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLocationWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLocationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLocationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self NewsubscribeAttributeHardwareVersionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionStringWithCompletion:completionHandler]; +} +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeHardwareVersionStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSoftwareVersionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeSoftwareVersionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionStringWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSoftwareVersionStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} -@implementation MTRBaseClusterOtaSoftwareUpdateProvider (Deprecated) +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeManufacturingDateWithCompletion:completionHandler]; +} +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeManufacturingDateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeManufacturingDateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePartNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartNumberWithCompletion:completionHandler]; +} +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePartNumberWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartNumberWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeProductURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductURLWithCompletion:completionHandler]; +} +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeProductURLWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductURLWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductLabelWithCompletion:completionHandler]; +} +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeProductLabelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductLabelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSerialNumberWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSerialNumberWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSerialNumberWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLocalConfigDisabledWithCompletion:completionHandler]; +} +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLocalConfigDisabledWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLocalConfigDisabledWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLocalConfigDisabledWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLocalConfigDisabledWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeReachableWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReachableWithCompletion:completionHandler]; +} +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeReachableWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReachableWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUniqueIDWithCompletion:completionHandler]; +} +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeUniqueIDWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUniqueIDWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCapabilityMinimaWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCapabilityMinimaWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCapabilityMinimaWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { @@ -13068,7 +16752,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterOtaSoftwareUpdateRequestor +@implementation MTRBaseClusterOtaSoftwareUpdateProvider - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -13083,481 +16767,196 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params + completion:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type request; + OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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.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]; } - request.endpoint = params.endpoint.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ // Make a copy of params before we go async. +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completion:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. params = [params copy]; - new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.updateToken = [self asByteSpan:params.updateToken]; + request.newVersion = params.newVersion.unsignedIntValue; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( + new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - + chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTROtaSoftwareUpdateRequestorClusterProviderLocation class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTROtaSoftwareUpdateRequestorClusterProviderLocation *) value[i_0]; - listHolder_0->mList[i_0].providerNodeID = element_0.providerNodeID.unsignedLongLongValue; - listHolder_0->mList[i_0].endpoint = element_0.endpoint.unsignedShortValue; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} + request.updateToken = [self asByteSpan:params.updateToken]; + request.softwareVersion = params.softwareVersion.unsignedIntValue; -- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -13567,77 +16966,74 @@ new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -13647,71 +17043,70 @@ new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( + __block MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -13721,24 +17116,24 @@ new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -13751,11 +17146,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -13764,18 +17159,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -13791,25 +17186,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -13822,11 +17216,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -13835,19 +17229,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -13865,50 +17258,255 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterOtaSoftwareUpdateRequestor (Deprecated) +@implementation MTRBaseClusterOtaSoftwareUpdateProvider (Deprecated) -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self queryImageWithParams:params completion:completionHandler]; } - -@end - -@implementation MTRBaseClusterLocalizationConfiguration - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self applyUpdateRequestWithParams:params completion:completionHandler]; } - -- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - auto successFn = Callback::FromCancelable(success); + [self notifyUpdateAppliedWithParams:params completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterOtaSoftwareUpdateRequestor + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ // Make a copy of params before we go async. + params = [params copy]; + new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeActiveLocaleWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -13917,7 +17515,7 @@ - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -13928,68 +17526,167 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTROtaSoftwareUpdateRequestorClusterProviderLocation class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTROtaSoftwareUpdateRequestorClusterProviderLocation *) value[i_0]; + listHolder_0->mList[i_0].providerNodeID = element_0.providerNodeID.unsignedLongLongValue; + listHolder_0->mList[i_0].endpoint = element_0.endpoint.unsignedShortValue; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( + __block MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -13999,72 +17696,74 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( + __block MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -14074,77 +17773,147 @@ new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -14154,77 +17923,74 @@ new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -14234,71 +18000,70 @@ new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + __block MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -14308,24 +18073,24 @@ new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -14338,11 +18103,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -14351,18 +18116,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -14378,25 +18143,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -14409,11 +18173,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -14422,19 +18186,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -14452,7 +18215,294 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterLocalizationConfiguration (Deprecated) +@implementation MTRBaseClusterOtaSoftwareUpdateRequestor (Deprecated) + +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self announceOtaProviderWithParams:params completion:completionHandler]; +} + +- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDefaultOtaProvidersWithParams:params completion:completionHandler]; +} +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDefaultOtaProvidersWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDefaultOtaProvidersWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDefaultOtaProvidersWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDefaultOtaProvidersWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUpdatePossibleWithCompletion:completionHandler]; +} +- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeUpdatePossibleWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUpdatePossibleWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUpdateStateWithCompletion:completionHandler]; +} +- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeUpdateStateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUpdateStateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUpdateStateProgressWithCompletion:completionHandler]; +} +- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeUpdateStateProgressWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUpdateStateProgressWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { @@ -14461,7 +18511,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterTimeFormatLocalization +@implementation MTRBaseClusterLocalizationConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -14476,26 +18526,25 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributeHourFormatWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeHourFormatWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeActiveLocaleWithValue:(NSString * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14504,7 +18553,7 @@ - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -14515,182 +18564,141 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( + __block MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -14700,77 +18708,75 @@ new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge( }); } -- (void)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge( + __block MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge:: + MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -14780,73 +18786,74 @@ new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -14856,147 +18863,70 @@ new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -15006,24 +18936,24 @@ new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -15036,11 +18966,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -15049,18 +18979,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -15076,25 +19006,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -15107,11 +19036,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -15120,19 +19049,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -15150,7 +19078,225 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterTimeFormatLocalization (Deprecated) +@implementation MTRBaseClusterLocalizationConfiguration (Deprecated) + +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveLocaleWithCompletion:completionHandler]; +} +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveLocaleWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveLocaleWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveLocaleWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveLocaleWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedLocalesWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSupportedLocalesWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedLocalesWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { @@ -15159,7 +19305,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterUnitLocalization +@implementation MTRBaseClusterTimeFormatLocalization - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -15174,26 +19320,25 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeHourFormatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -15202,7 +19347,7 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -15213,70 +19358,70 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( + __block MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -15286,73 +19431,109 @@ new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -15362,73 +19543,75 @@ new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -15438,389 +19621,72 @@ new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRUnitLocalizationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRUnitLocalizationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -@end - -@implementation MTRBaseClusterUnitLocalization (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterPowerSourceConfiguration - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -15830,77 +19696,71 @@ new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -15910,71 +19770,70 @@ new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -15984,24 +19843,24 @@ new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -16014,11 +19873,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -16027,18 +19886,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -16054,25 +19913,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -16085,11 +19943,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -16098,19 +19956,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -16128,233 +19985,390 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterPowerSourceConfiguration (Deprecated) +@implementation MTRBaseClusterTimeFormatLocalization (Deprecated) -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeHourFormatWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeHourFormatWithCompletion:completionHandler]; } - -@end - -@implementation MTRBaseClusterPowerSource - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self writeAttributeHourFormatWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeHourFormatWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeHourFormatWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHourFormatWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeActiveCalendarTypeWithCompletion:completionHandler]; +} +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveCalendarTypeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveCalendarTypeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveCalendarTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveCalendarTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeSupportedCalendarTypesWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSupportedCalendarTypesWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedCalendarTypesWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterUnitLocalization + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; } - return CHIP_ERROR_NOT_FOUND; - }); + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( + __block MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -16364,219 +20378,218 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + __block MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + __block MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRUnitLocalizationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( + __block MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRUnitLocalizationAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -16586,100 +20599,24 @@ new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge( }); } -- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -16692,11 +20629,11 @@ - (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnul // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -16705,19 +20642,18 @@ - (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -16733,70 +20669,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -16806,142 +20739,283 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterUnitLocalization (Deprecated) + +- (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeTemperatureUnitWithCompletion:completionHandler]; +} +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeTemperatureUnitWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeTemperatureUnitWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTemperatureUnitWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTemperatureUnitWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterPowerSourceConfiguration + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; } - return CHIP_ERROR_NOT_FOUND; - }); + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge( + __block MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -16951,362 +21025,365 @@ new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeBatVoltageWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + __block MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + __block MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17316,71 +21393,270 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeBatReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterPowerSourceConfiguration (Deprecated) + +- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSourcesWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSourcesWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSourcesWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterPowerSource + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( + __block MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17390,67 +21666,66 @@ new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge( }); } -- (void)readAttributeBatPresentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17460,145 +21735,142 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeActiveBatFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17608,70 +21880,71 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeBatCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17681,143 +21954,142 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBatANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( + __block MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17827,12 +22099,11 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeBatApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -17840,13 +22111,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -17859,7 +22129,7 @@ - (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnu // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -17872,19 +22142,19 @@ - (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -17900,12 +22170,11 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBatCapacityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -17913,11 +22182,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -17930,7 +22200,7 @@ - (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInt // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -17943,19 +22213,19 @@ - (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInt params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -17971,68 +22241,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBatQuantityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -18042,71 +22311,69 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeBatChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( + __block MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -18116,12 +22383,11 @@ new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge( }); } -- (void)readAttributeBatTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -18129,13 +22395,12 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -18149,7 +22414,7 @@ - (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnul // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -18162,19 +22427,18 @@ - (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -18190,70 +22454,69 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -18263,12 +22526,11 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeBatChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -18276,12 +22538,12 @@ new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, co }); } -- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -18295,7 +22557,7 @@ - (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -18308,19 +22570,18 @@ - (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -18336,72 +22597,69 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeActiveBatChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( + __block MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -18411,147 +22669,141 @@ new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -18561,140 +22813,67 @@ new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPowerSourceAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRPowerSourceAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -18704,69 +22883,68 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -18776,218 +22954,143 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterPowerSource (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterGeneralCommissioning - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params - completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GeneralCommissioning::Commands::ArmFailSafe::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; - request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params - completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - request.newRegulatoryConfig = static_cast>( - params.newRegulatoryConfig.unsignedCharValue); - request.countryCode = [self asCharSpan:params.countryCode]; - request.breadcrumb = params.breadcrumb.unsignedLongLongValue; + using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)commissioningCompleteWithCompletionHandler: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self commissioningCompleteWithParams:nil completionHandler:completionHandler]; -} -- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params - completionHandler: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(self.callbackQueue, self.device, - completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GeneralCommissioning::Commands::CommissioningComplete::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -18997,310 +23100,282 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBasicCommissioningInfoWithCompletionHandler: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void) - subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -19310,149 +23385,139 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -19462,140 +23527,69 @@ new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -19605,69 +23599,70 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -19677,351 +23672,290 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterGeneralCommissioning (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterNetworkCommissioning - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::ScanNetworks::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - } - } - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - 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; - } + using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.operationalDataset = [self asByteSpan:params.operationalDataset]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::RemoveNetwork::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.networkID = [self asByteSpan:params.networkID]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::ConnectNetwork::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - request.networkID = [self asByteSpan:params.networkID]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } + using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::ReorderNetwork::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } - 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; - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return CHIP_ERROR_NOT_FOUND; }); } -- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNetworkCommissioningNetworksListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( + __block MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNetworkCommissioningNetworksListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20031,69 +23965,68 @@ new MTRNetworkCommissioningNetworksListAttributeCallbackBridge( }); } -- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPowerSourceAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRPowerSourceAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20103,70 +24036,67 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20176,107 +24106,67 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20286,1026 +24176,1086 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterPowerSource (Deprecated) + +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeStatusWithCompletion:completionHandler]; } - -- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - auto successFn - = Callback::FromCancelable( - success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge * - innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeStatusWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable( - success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeStatusWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeOrderWithCompletion:completionHandler]; } - -- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableOctetStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableOctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeOrderWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeOrderWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeDescriptionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDescriptionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDescriptionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt32sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeWiredAssessedInputVoltageWithCompletion:completionHandler]; +} +- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeWiredAssessedInputVoltageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeWiredAssessedInputVoltageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeWiredAssessedInputFrequencyWithCompletion:completionHandler]; +} +- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeWiredAssessedInputFrequencyWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeWiredAssessedInputFrequencyWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeWiredCurrentTypeWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeWiredCurrentTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWiredCurrentTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeWiredAssessedCurrentWithCompletion:completionHandler]; } - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeWiredAssessedCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeWiredAssessedCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeWiredNominalVoltageWithCompletion:completionHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeWiredNominalVoltageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeWiredNominalVoltageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeWiredMaximumCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeWiredMaximumCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWiredMaximumCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeWiredPresentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeWiredPresentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWiredPresentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeActiveWiredFaultsWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveWiredFaultsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveWiredFaultsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( +- (void)readAttributeBatVoltageWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeBatVoltageWithCompletion:completionHandler]; } - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeBatVoltageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeBatVoltageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeBatPercentRemainingWithCompletion:completionHandler]; } - -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeBatPercentRemainingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeBatPercentRemainingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterNetworkCommissioning (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeBatTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeBatTimeRemainingWithCompletion:completionHandler]; } - -@end - -@implementation MTRBaseClusterDiagnosticLogs - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void) + subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self NewsubscribeAttributeBatTimeRemainingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params - completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.intent = static_cast>(params.intent.unsignedCharValue); - request.requestedProtocol = static_cast>( - params.requestedProtocol.unsignedCharValue); - request.transferFileDesignator = [self asByteSpan:params.transferFileDesignator]; + [self readAttributeBatTimeRemainingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); +- (void)readAttributeBatChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBatChargeLevelWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatChargeLevelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatChargeLevelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeBatReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeBatReplacementNeededWithCompletion:completionHandler]; } - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeBatReplacementNeededWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeBatReplacementNeededWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBatReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeBatReplaceabilityWithCompletion:completionHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeBatReplaceabilityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeBatReplaceabilityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatPresentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeBatPresentWithCompletion:completionHandler]; } - -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeBatPresentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeBatPresentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveBatFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeActiveBatFaultsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveBatFaultsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveBatFaultsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeBatReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeBatReplacementDescriptionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatReplacementDescriptionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBatReplacementDescriptionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeBatCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBatCommonDesignationWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatCommonDesignationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatCommonDesignationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBatANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBatANSIDesignationWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatANSIDesignationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatANSIDesignationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBatIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBatIECDesignationWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatIECDesignationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatIECDesignationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBatApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBatApprovedChemistryWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatApprovedChemistryWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatApprovedChemistryWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBatCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatCapacityWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatCapacityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatCapacityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBatQuantityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatQuantityWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatQuantityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatQuantityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBatChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBatChargeStateWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatChargeStateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatChargeStateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBatTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBatTimeToFullChargeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatTimeToFullChargeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatTimeToFullChargeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBatFunctionalWhileChargingWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatFunctionalWhileChargingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBatFunctionalWhileChargingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBatChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBatChargingCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBatChargingCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBatChargingCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActiveBatChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveBatChargeFaultsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveBatChargeFaultsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveBatChargeFaultsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeClusterRevisionWithCompletion:completionHandler]; } - - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterDiagnosticLogs (Deprecated) - - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -21313,7 +25263,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterGeneralDiagnostics +@implementation MTRBaseClusterGeneralCommissioning - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -21328,198 +25278,148 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params + completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - GeneralDiagnostics::Commands::TestEventTrigger::Type request; + GeneralCommissioning::Commands::ArmFailSafe::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.enableKey = [self asByteSpan:params.enableKey]; - request.eventTrigger = params.eventTrigger.unsignedLongLongValue; + request.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; + request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params + completion:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.newRegulatoryConfig = static_cast>( + params.newRegulatoryConfig.unsignedCharValue); + request.countryCode = [self asCharSpan:params.countryCode]; + request.breadcrumb = params.breadcrumb.unsignedLongLongValue; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)commissioningCompleteWithCompletion:(void (^)( + MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completion { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self commissioningCompleteWithParams:nil completion:completion]; } - -+ (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params + completion: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + GeneralCommissioning::Commands::CommissioningComplete::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; + + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeRebootCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + value = [value copy]; - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -21532,11 +25432,11 @@ - (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -21545,18 +25445,18 @@ - (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -21572,217 +25472,80 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBasicCommissioningInfoWithCompletion: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)( + MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( + __block MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)( + MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21792,72 +25555,73 @@ new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( + __block MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21867,73 +25631,74 @@ new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( + __block MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21943,26 +25708,26 @@ new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -21975,11 +25740,11 @@ - (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _N // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -21988,19 +25753,19 @@ - (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _N params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -22016,73 +25781,72 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22092,73 +25856,71 @@ new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22168,70 +25930,69 @@ new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22241,24 +26002,24 @@ new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -22271,11 +26032,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -22284,18 +26045,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -22311,25 +26072,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -22342,11 +26102,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -22355,19 +26115,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -22385,7 +26144,346 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterGeneralDiagnostics (Deprecated) +@implementation MTRBaseClusterGeneralCommissioning (Deprecated) + +- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params + completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self armFailSafeWithParams:params completion:completionHandler]; +} +- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params + completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self setRegulatoryConfigWithParams:params completion:completionHandler]; +} +- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self commissioningCompleteWithParams:params completion:completionHandler]; +} +- (void)commissioningCompleteWithCompletionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self commissioningCompleteWithParams:nil completion:completionHandler]; +} + +- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBreadcrumbWithCompletion:completionHandler]; +} +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBreadcrumbWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBreadcrumbWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBreadcrumbWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBreadcrumbWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBasicCommissioningInfoWithCompletionHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBasicCommissioningInfoWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)( + MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBasicCommissioningInfoWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBasicCommissioningInfoWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRegulatoryConfigWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRegulatoryConfigWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRegulatoryConfigWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLocationCapabilityWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLocationCapabilityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLocationCapabilityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportsConcurrentConnectionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSupportsConcurrentConnectionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportsConcurrentConnectionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { @@ -22394,7 +26492,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterSoftwareDiagnostics +@implementation MTRBaseClusterNetworkCommissioning - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -22409,173 +26507,253 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)resetWatermarksWithCompletionHandler:(StatusCompletion)completionHandler +- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params + completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completion { - [self resetWatermarksWithParams:nil completionHandler:completionHandler]; + // Make a copy of params before we go async. + params = [params copy]; + new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + NetworkCommissioning::Commands::ScanNetworks::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + +- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - SoftwareDiagnostics::Commands::ResetWatermarks::Type request; + NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + } - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion { - new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.operationalDataset = [self asByteSpan:params.operationalDataset]; + if (params.breadcrumb != nil) { + auto & definedValue_0 = request.breadcrumb.Emplace(); + definedValue_0 = params.breadcrumb.unsignedLongLongValue; + } + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + NetworkCommissioning::Commands::RemoveNetwork::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } + request.networkID = [self asByteSpan:params.networkID]; + if (params.breadcrumb != nil) { + auto & definedValue_0 = request.breadcrumb.Emplace(); + definedValue_0 = params.breadcrumb.unsignedLongLongValue; + } - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params + completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completion { - new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + NetworkCommissioning::Commands::ConnectNetwork::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.networkID = [self asByteSpan:params.networkID]; + if (params.breadcrumb != nil) { + auto & definedValue_0 = request.breadcrumb.Emplace(); + definedValue_0 = params.breadcrumb.unsignedLongLongValue; + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + NetworkCommissioning::Commands::ReorderNetwork::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + } + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22585,69 +26763,139 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNetworkCommissioningNetworksListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + __block MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNetworkCommissioningNetworksListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22657,24 +26905,23 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -22682,45 +26929,45 @@ - (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _N minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22730,149 +26977,188 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(self.callbackQueue, self.device, + completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + auto successFn + = Callback::FromCancelable( + success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge * + innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable( + success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22882,140 +27168,68 @@ new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRNullableOctetStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableOctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -23025,69 +27239,70 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt32sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -23097,202 +27312,146 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterSoftwareDiagnostics (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -@end - -@implementation MTRBaseClusterThreadNetworkDiagnostics - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self resetCountsWithParams:nil completionHandler:completionHandler]; -} -- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ThreadNetworkDiagnostics::Commands::ResetCounts::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeChannelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + __block MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRoutingRoleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( + __block MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -23302,165 +27461,94 @@ new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge }); } -- (void)readAttributeNetworkNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableCharStringAttributeCallbackSubscriptionBridge( + __block MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + subscriptionEstablished); } -- (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeExtendedPanIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -23468,119 +27556,44 @@ - (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minI minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableOctetStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableOctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -23590,68 +27603,67 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Ca }); } -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -23661,147 +27673,560 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} +@end -- (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); +@implementation MTRBaseClusterNetworkCommissioning (Deprecated) - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self scanNetworksWithParams:params completion:completionHandler]; } - -+ (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + [self addOrUpdateWiFiNetworkWithParams:params completion:completionHandler]; +} +- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self addOrUpdateThreadNetworkWithParams:params completion:completionHandler]; +} +- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self removeNetworkWithParams:params completion:completionHandler]; +} +- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self connectNetworkWithParams:params completion:completionHandler]; +} +- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self reorderNetworkWithParams:params completion:completionHandler]; +} + +- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxNetworksWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxNetworksWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxNetworksWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNetworksWithCompletion:completionHandler]; +} +- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNetworksWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNetworksWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeScanMaxTimeSecondsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeScanMaxTimeSecondsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScanMaxTimeSecondsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeConnectMaxTimeSecondsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeConnectMaxTimeSecondsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeConnectMaxTimeSecondsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInterfaceEnabledWithCompletion:completionHandler]; +} +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInterfaceEnabledWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInterfaceEnabledWithValue:value params:params completion:completionHandler]; +} +- (void) + subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInterfaceEnabledWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInterfaceEnabledWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLastNetworkingStatusWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLastNetworkingStatusWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastNetworkingStatusWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastNetworkIDWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLastNetworkIDWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastNetworkIDWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLastConnectErrorValueWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLastConnectErrorValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastConnectErrorValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterDiagnosticLogs + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params + completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.intent = static_cast>(params.intent.unsignedCharValue); + request.requestedProtocol = static_cast>( + params.requestedProtocol.unsignedCharValue); + request.transferFileDesignator = [self asByteSpan:params.transferFileDesignator]; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeRouteTableListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge( + __block MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -23811,140 +28236,141 @@ new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge( }); } -- (void)readAttributePartitionIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + __block MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeWeightingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -23954,69 +28380,67 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeDataVersionWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24026,70 +28450,67 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24099,98 +28520,308 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterDiagnosticLogs (Deprecated) + +- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params + completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self retrieveLogsRequestWithParams:params completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterGeneralDiagnostics + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params + completion:(MTRStatusCompletion)completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + GeneralDiagnostics::Commands::TestEventTrigger::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.enableKey = [self asByteSpan:params.enableKey]; + request.eventTrigger = params.eventTrigger.unsignedLongLongValue; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -24203,11 +28834,11 @@ - (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull) // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -24216,19 +28847,18 @@ - (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull) params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -24244,69 +28874,66 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24316,69 +28943,69 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24388,69 +29015,67 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBootReasonsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24460,142 +29085,292 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + __block MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)NewsubscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24605,70 +29380,288 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24678,25 +29671,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -24709,11 +29701,11 @@ - (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull) // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -24722,19 +29714,18 @@ - (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull) params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -24750,68 +29741,617 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxTotalCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); +@end + +@implementation MTRBaseClusterGeneralDiagnostics (Deprecated) + +- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testEventTriggerWithParams:params completion:completionHandler]; +} + +- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNetworkInterfacesWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNetworkInterfacesWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNetworkInterfacesWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRebootCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRebootCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRebootCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRebootCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUpTimeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeUpTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUpTimeWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalOperationalHoursWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTotalOperationalHoursWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalOperationalHoursWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBootReasonsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBootReasonsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBootReasonsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveHardwareFaultsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveHardwareFaultsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveHardwareFaultsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveRadioFaultsWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveRadioFaultsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveRadioFaultsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveNetworkFaultsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveNetworkFaultsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveNetworkFaultsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTestEventTriggersEnabledWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTestEventTriggersEnabledWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTestEventTriggersEnabledWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterSoftwareDiagnostics + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)resetWatermarksWithCompletion:(MTRStatusCompletion)completion +{ + [self resetWatermarksWithParams:nil completion:completion]; +} +- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + SoftwareDiagnostics::Commands::ResetWatermarks::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24821,69 +30361,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24893,69 +30431,70 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24965,241 +30504,245 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeTxDataCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -25212,11 +30755,11 @@ - (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInt // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -25225,19 +30768,18 @@ - (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInt params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -25253,69 +30795,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25325,213 +30865,403 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxBeaconCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterSoftwareDiagnostics (Deprecated) + +- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self resetWatermarksWithParams:params completion:completionHandler]; +} +- (void)resetWatermarksWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetWatermarksWithParams:nil completion:completionHandler]; } -- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeThreadMetricsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeThreadMetricsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeThreadMetricsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeCurrentHeapFreeWithCompletion:completionHandler]; } - -- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeCurrentHeapFreeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeCurrentHeapFreeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeCurrentHeapUsedWithCompletion:completionHandler]; } - -- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; + [self NewsubscribeAttributeCurrentHeapUsedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHeapUsedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHeapHighWatermarkWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentHeapHighWatermarkWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHeapHighWatermarkWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterThreadNetworkDiagnostics + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion +{ + [self resetCountsWithParams:nil completion:completion]; +} +- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ThreadNetworkDiagnostics::Commands::ResetCounts::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} +- (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -+ (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25541,68 +31271,144 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + __block MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + return CHIP_ERROR_NOT_FOUND; + }); +} +- (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -+ (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25612,70 +31418,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25685,70 +31488,68 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25758,69 +31559,68 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableOctetStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableOctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25830,23 +31630,22 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -25854,45 +31653,44 @@ - (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)mi minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25902,141 +31700,214 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNeighborTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRouteTableListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + __block MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + return CHIP_ERROR_NOT_FOUND; + }); +} +- (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -+ (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26046,69 +31917,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26118,69 +31987,68 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26190,68 +32058,68 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxDataCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26261,69 +32129,68 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26333,69 +32200,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26405,70 +32270,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26478,68 +32340,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26549,70 +32410,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26622,70 +32480,68 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26695,69 +32551,70 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26767,69 +32624,70 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26839,70 +32697,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26912,12 +32767,11 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -26925,13 +32779,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -26944,7 +32797,7 @@ - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _N // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -26957,19 +32810,18 @@ - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _N params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -26985,12 +32837,11 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxErrSecCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -26998,12 +32849,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -27016,7 +32867,7 @@ - (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minI // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -27029,19 +32880,18 @@ - (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -27057,12 +32907,11 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -27070,12 +32919,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -27088,7 +32937,7 @@ - (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minI // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -27101,19 +32950,18 @@ - (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -27129,12 +32977,11 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -27142,12 +32989,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -27160,7 +33007,7 @@ - (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -27173,19 +33020,19 @@ - (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -27201,23 +33048,22 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -27225,46 +33071,44 @@ - (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)mi minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -27274,70 +33118,69 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -27347,67 +33190,67 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -27417,146 +33260,137 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeSecurityPolicyWithCompletionHandler: - (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeChannelPage0MaskWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableOctetStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableOctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -27566,418 +33400,369 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Ca }); } -- (void)readAttributeOperationalDatasetComponentsWithCompletionHandler: - (void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void) - subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - auto successFn - = Callback::FromCancelable( - success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge * - innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void) - readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable( - success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -27985,11 +33770,12 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -28002,7 +33788,7 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -28015,18 +33801,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -28042,69 +33828,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28114,124 +33898,139 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterThreadNetworkDiagnostics (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterWiFiNetworkDiagnostics - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self resetCountsWithParams:nil completionHandler:completionHandler]; -} -- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - WiFiNetworkDiagnostics::Commands::ResetCounts::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableOctetStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableOctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28241,227 +34040,207 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Ca }); } -- (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeWiFiVersionWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeChannelNumberWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28471,67 +34250,67 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28541,70 +34320,67 @@ new MTRNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28614,70 +34390,69 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeBeaconRxCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28687,71 +34462,67 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28761,71 +34532,70 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28835,71 +34605,70 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28909,24 +34678,22 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -28934,46 +34701,44 @@ - (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnu minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28983,70 +34748,67 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29056,69 +34818,70 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29128,250 +34891,167 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -29384,11 +35064,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -29397,18 +35077,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -29424,69 +35104,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29496,202 +35174,139 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterWiFiNetworkDiagnostics (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterEthernetNetworkDiagnostics - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self resetCountsWithParams:nil completionHandler:completionHandler]; -} -- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableBooleanAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableBooleanAttributeCallbackSubscriptionBridge( + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29701,69 +35316,67 @@ new MTRNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29773,69 +35386,144 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + __block MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)NewsubscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableOctetStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableOctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29845,435 +35533,246 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOperationalDatasetComponentsWithCompletion: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(self.callbackQueue, self.device, + completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + NewsubscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + auto successFn + = Callback::FromCancelable( + success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge * + innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void) + readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable( + success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return CHIP_ERROR_NOT_FOUND; }); } -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableBooleanAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableBooleanAttributeCallbackSubscriptionBridge( + __block MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return CHIP_ERROR_NOT_FOUND; }); } -- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -30283,77 +35782,74 @@ new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn - = Callback::FromCancelable(success); + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -30363,71 +35859,70 @@ new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -30437,27 +35932,27 @@ new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( @@ -30467,11 +35962,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -30480,18 +35975,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -30507,25 +36002,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -30538,11 +36032,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -30551,19 +36045,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -30581,2316 +36074,2246 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterEthernetNetworkDiagnostics (Deprecated) +@implementation MTRBaseClusterThreadNetworkDiagnostics (Deprecated) -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self resetCountsWithParams:params completion:completionHandler]; } - -@end - -@implementation MTRBaseClusterBridgedDeviceBasic - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self resetCountsWithParams:nil completion:completionHandler]; } -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeChannelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeChannelWithCompletion:completionHandler]; } - -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeChannelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeChannelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRoutingRoleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRoutingRoleWithCompletion:completionHandler]; } - -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRVendorIdAttributeCallbackSubscriptionBridge * callbackBridge = new MTRVendorIdAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRVendorIdAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRoutingRoleWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRoutingRoleWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeProductNameWithCompletionHandler:(void (^)( +- (void)readAttributeNetworkNameWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNetworkNameWithCompletion:completionHandler]; } - -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNetworkNameWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNetworkNameWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributePanIdWithCompletion:completionHandler]; } - -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self NewsubscribeAttributePanIdWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributePanIdWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeExtendedPanIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeExtendedPanIdWithCompletion:completionHandler]; } - -+ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeExtendedPanIdWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeExtendedPanIdWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeshLocalPrefixWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeMeshLocalPrefixWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMeshLocalPrefixWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeOverrunCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeOverrunCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeOverrunCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNeighborTableListWithCompletion:completionHandler]; } - -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNeighborTableListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNeighborTableListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRouteTableListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRouteTableListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRouteTableListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRouteTableListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributePartitionIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributePartitionIdWithCompletion:completionHandler]; +} +- (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePartitionIdWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartitionIdWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeWeightingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWeightingWithCompletion:completionHandler]; +} +- (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeWeightingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWeightingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDataVersionWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeDataVersionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDataVersionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDataVersionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, +- (void)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeStableDataVersionWithCompletion:completionHandler]; } - -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeStableDataVersionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeStableDataVersionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributePartNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeLeaderRouterIdWithCompletion:completionHandler]; } - -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeLeaderRouterIdWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeLeaderRouterIdWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeProductURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeDetachedRoleCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeDetachedRoleCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeDetachedRoleCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeChildRoleCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeChildRoleCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeChildRoleCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRouterRoleCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRouterRoleCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRouterRoleCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeLeaderRoleCountWithCompletion:completionHandler]; } - -- (void)readAttributeReachableWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeLeaderRoleCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeLeaderRoleCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttachAttemptCountWithCompletion:completionHandler]; } - -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeAttachAttemptCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeAttachAttemptCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePartitionIdChangeCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePartitionIdChangeCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartitionIdChangeCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeBetterPartitionAttachAttemptCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeParentChangeCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeParentChangeCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeParentChangeCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxTotalCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeTxTotalCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxTotalCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxTotalCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTxUnicastCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxUnicastCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxUnicastCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeTxBroadcastCountWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxBroadcastCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxBroadcastCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeTxAckRequestedCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeTxAckRequestedCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeTxAckRequestedCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeTxAckedCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeTxAckedCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeTxAckedCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeTxNoAckRequestedCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeTxNoAckRequestedCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxNoAckRequestedCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxDataCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeTxDataCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxDataCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxDataCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeTxDataPollCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeTxDataPollCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeTxDataPollCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end +- (void)readAttributeTxBeaconCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxBeaconCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxBeaconCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxBeaconCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} -@implementation MTRBaseClusterBridgedDeviceBasic (Deprecated) +- (void)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTxBeaconRequestCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxBeaconRequestCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxBeaconRequestCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeTxOtherCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxOtherCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxOtherCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end +- (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxRetryCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxRetryCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxRetryCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} -@implementation MTRBaseClusterSwitch +- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTxDirectMaxRetryExpiryCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } + [self readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; +- (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxErrCcaCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxErrCcaCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxErrCcaCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeTxErrAbortCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxErrAbortCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxErrAbortCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeTxErrBusyChannelCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxErrBusyChannelCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxErrBusyChannelCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxTotalCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxTotalCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxTotalCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRxUnicastCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxUnicastCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxUnicastCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRxBroadcastCountWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxBroadcastCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxBroadcastCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)readAttributeRxDataCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxDataCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxDataCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxDataCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRxDataPollCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRxDataPollCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRxDataPollCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)( +- (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRxBeaconCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRxBeaconCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRxBeaconCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRSwitchGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRxBeaconRequestCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRxBeaconRequestCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRSwitchGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRxBeaconRequestCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRSwitchAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRxOtherCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxOtherCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxOtherCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeRxAddressFilteredCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxAddressFilteredCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxAddressFilteredCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRxDestAddrFilteredCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxDestAddrFilteredCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxDestAddrFilteredCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRSwitchAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRxDuplicatedCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxDuplicatedCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxDuplicatedCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRSwitchAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRxErrNoFrameCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxErrNoFrameCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxErrNoFrameCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeRxErrUnknownNeighborCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxErrUnknownNeighborCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRxErrUnknownNeighborCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRxErrInvalidSrcAddrCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)readAttributeRxErrSecCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxErrSecCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRxErrSecCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRSwitchAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRxErrSecCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRxErrFcsCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRxErrFcsCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRxErrFcsCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRxErrOtherCountWithCompletion:completionHandler]; } - -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRxErrOtherCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRxErrOtherCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterSwitch (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeActiveTimestampWithCompletion:completionHandler]; } - -@end - -@implementation MTRBaseClusterAdministratorCommissioning - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self NewsubscribeAttributeActiveTimestampWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - request.PAKEVerifier = [self asByteSpan:params.pakeVerifier]; - request.discriminator = params.discriminator.unsignedShortValue; - request.iterations = params.iterations.unsignedIntValue; - request.salt = [self asByteSpan:params.salt]; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributeActiveTimestampWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributePendingTimestampWithCompletion:completionHandler]; } - -- (void)revokeCommissioningWithCompletionHandler:(StatusCompletion)completionHandler +- (void) + subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self revokeCommissioningWithParams:nil completionHandler:completionHandler]; + [self NewsubscribeAttributePendingTimestampWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePendingTimestampWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDelayWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDelayWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDelayWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeSecurityPolicyWithCompletionHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSecurityPolicyWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSecurityPolicyWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSecurityPolicyWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeChannelPage0MaskWithCompletionHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeChannelPage0MaskWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeChannelPage0MaskWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeChannelPage0MaskWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOperationalDatasetComponentsWithCompletionHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeOperationalDatasetComponentsWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOperationalDatasetComponentsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void) + readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeOperationalDatasetComponentsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveNetworkFaultsListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveNetworkFaultsListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveNetworkFaultsListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterWiFiNetworkDiagnostics + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion +{ + [self resetCountsWithParams:nil completion:completion]; +} +- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - AdministratorCommissioning::Commands::RevokeCommissioning::Type request; + WiFiNetworkDiagnostics::Commands::ResetCounts::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBssidWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( + __block MTRNullableOctetStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableOctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; auto successFn - = Callback::FromCancelable( - success); + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge * - innerCallbackBridge + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge:: + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn - = Callback::FromCancelable( - success); + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -32900,98 +38323,101 @@ new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallba }); } -- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -33005,11 +38431,11 @@ - (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minI // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -33018,19 +38444,18 @@ - (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minI params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -33046,301 +38471,283 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRssiWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + new MTRNullableInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33350,69 +38757,71 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33422,316 +38831,360 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterAdministratorCommissioning (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -@end +- (void)NewsubscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); -@implementation MTRBaseClusterOperationalCredentials + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue ++ (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::AttestationRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.attestationNonce = [self asByteSpan:params.attestationNonce]; - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::CertificateChainRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - request.certificateType = params.certificateType.unsignedCharValue; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::CSRRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.CSRNonce = [self asByteSpan:params.csrNonce]; - if (params.isForUpdateNOC != nil) { - auto & definedValue_0 = request.isForUpdateNOC.Emplace(); - definedValue_0 = params.isForUpdateNOC.boolValue; + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::AddNOC::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - 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); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateNOC::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.NOCValue = [self asByteSpan:params.nocValue]; - if (params.icacValue != nil) { - auto & definedValue_0 = request.ICACValue.Emplace(); - definedValue_0 = [self asByteSpan:params.icacValue]; + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateFabricLabel::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.label = [self asCharSpan:params.label]; - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::RemoveFabric::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - request.fabricIndex = params.fabricIndex.unsignedCharValue; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - request.rootCertificate = [self asByteSpan:params.rootCertificate]; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ // Make a copy of params before we go async. - params = [params copy]; - new MTROperationalCredentialsNOCsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( + __block MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROperationalCredentialsNOCsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33741,71 +39194,71 @@ new MTROperationalCredentialsNOCsListAttributeCallbackBridge( }); } -- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ // Make a copy of params before we go async. - params = [params copy]; - new MTROperationalCredentialsFabricsListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge( + __block MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTROperationalCredentialsFabricsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33815,142 +39268,140 @@ new MTROperationalCredentialsFabricsListAttributeCallbackBridge( }); } -- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33960,103 +39411,22 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -34064,45 +39434,44 @@ - (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34112,378 +39481,548 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); +@end + +@implementation MTRBaseClusterWiFiNetworkDiagnostics (Deprecated) + +- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithParams:params completion:completionHandler]; +} +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithParams:nil completion:completionHandler]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBssidWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBssidWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBssidWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSecurityTypeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSecurityTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSecurityTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeWiFiVersionWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWiFiVersionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeWiFiVersionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWiFiVersionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeChannelNumberWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeChannelNumberWithCompletion:completionHandler]; +} +- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeChannelNumberWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeChannelNumberWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRssiWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRssiWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRssiWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBeaconLostCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBeaconLostCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBeaconLostCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBeaconRxCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBeaconRxCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBeaconRxCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBeaconRxCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePacketMulticastRxCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePacketMulticastRxCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePacketMulticastRxCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePacketMulticastTxCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePacketMulticastTxCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePacketMulticastTxCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePacketUnicastRxCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self NewsubscribeAttributePacketUnicastRxCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePacketUnicastRxCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePacketUnicastTxCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePacketUnicastTxCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePacketUnicastTxCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentMaxRateWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentMaxRateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentMaxRateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOverrunCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOverrunCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOverrunCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROperationalCredentialsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAttributeListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROperationalCredentialsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFeatureMapWithCompletion:completionHandler]; } - - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeClusterRevisionWithCompletion:completionHandler]; } - - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterOperationalCredentials (Deprecated) - - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -34491,7 +40030,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterGroupKeyManagement +@implementation MTRBaseClusterEthernetNetworkDiagnostics - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -34506,298 +40045,104 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetWrite::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRead::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self resetCountsWithParams:nil completion:completion]; } - -- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRemove::Type request; + EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.groupKeySetIDs.count != 0) { - auto * listHolder_0 = new ListHolder(params.groupKeySetIDs.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.groupKeySetIDs.count; ++i_0) { - if (![params.groupKeySetIDs[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.groupKeySetIDs[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedShortValue; - } - request.groupKeySetIDs = ListType_0(listHolder_0->mList, params.groupKeySetIDs.count); - } else { - request.groupKeySetIDs = ListType_0(); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ // Make a copy of params before we go async. - params = [params copy]; - new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); -} - -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, + new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRGroupKeyManagementClusterGroupKeyMapStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRGroupKeyManagementClusterGroupKeyMapStruct *) value[i_0]; - listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; - listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge( + __block MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34807,143 +40152,138 @@ new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( }); } -- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ // Make a copy of params before we go async. - params = [params copy]; - new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, +- (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge( + __block MTRNullableBooleanAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34953,70 +40293,67 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35026,292 +40363,137 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35321,23 +40503,22 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -35345,45 +40526,44 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35393,94 +40573,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterGroupKeyManagement (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterFixedLabel - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)readAttributeLabelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRFixedLabelLabelListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge( + __block MTRNullableBooleanAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRFixedLabelLabelListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35490,72 +40644,145 @@ new MTRFixedLabelLabelListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35565,72 +40792,74 @@ new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35640,70 +40869,70 @@ new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRFixedLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( + __block MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRFixedLabelAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35713,24 +40942,24 @@ new MTRFixedLabelAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -35743,11 +40972,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -35756,18 +40985,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -35783,25 +41012,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -35814,11 +41042,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -35827,19 +41055,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -35857,530 +41084,429 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterFixedLabel (Deprecated) +@implementation MTRBaseClusterEthernetNetworkDiagnostics (Deprecated) -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self resetCountsWithParams:params completion:completionHandler]; } - -@end - -@implementation MTRBaseClusterUserLabel - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } + [self resetCountsWithParams:nil completion:completionHandler]; +} - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; +- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePHYRateWithCompletion:completionHandler]; +} +- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePHYRateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePHYRateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeLabelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUserLabelLabelListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFullDuplexWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFullDuplexWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFullDuplexWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeLabelListWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributePacketRxCountWithCompletion:completionHandler]; } -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + [self NewsubscribeAttributePacketRxCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePacketRxCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePacketTxCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePacketTxCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePacketTxCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - ListFreer listFreer; - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRUserLabelClusterLabelStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUserLabelClusterLabelStruct *) value[i_0]; - listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); +- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxErrCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTxErrCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxErrCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); +- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCollisionCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCollisionCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCollisionCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeOverrunCountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOverrunCountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOverrunCountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCarrierDetectWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCarrierDetectWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCarrierDetectWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRUserLabelLabelListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeTimeSinceResetWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTimeSinceResetWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTimeSinceResetWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUserLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAttributeListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRUserLabelAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFeatureMapWithCompletion:completionHandler]; } - - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeClusterRevisionWithCompletion:completionHandler]; } - - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterUserLabel (Deprecated) - - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -36388,7 +41514,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterBooleanState +@implementation MTRBaseClusterBridgedDeviceBasic - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -36403,67 +41529,137 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributeStateValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRVendorIdAttributeCallbackSubscriptionBridge * callbackBridge = new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRVendorIdAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36473,290 +41669,176 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + value = [value copy]; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRBooleanStateAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRBooleanStateAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36766,25 +41848,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -36797,11 +41878,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -36810,19 +41891,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -36838,78 +41918,25 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterBooleanState (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterModeSelect - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ModeSelect::Commands::ChangeToMode::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.newMode = params.newMode.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -36923,11 +41950,11 @@ - (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInt // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -36936,19 +41963,19 @@ - (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInt params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -36964,70 +41991,67 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37037,142 +42061,70 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRModeSelectSupportedModesListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRModeSelectSupportedModesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37182,112 +42134,68 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37297,110 +42205,68 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37410,290 +42276,279 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRModeSelectAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRModeSelectAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37703,69 +42558,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37775,842 +42628,358 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterModeSelect (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -@end - -@implementation MTRBaseClusterDoorLock - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::LockDoor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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]; + new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return CHIP_ERROR_NOT_FOUND; }); } -- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::UnlockDoor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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]; - } - } - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::UnlockWithTimeout::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - 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]; - } + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::SetWeekDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } - 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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return CHIP_ERROR_NOT_FOUND; }); } -- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::GetWeekDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::ClearWeekDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::SetYearDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return CHIP_ERROR_NOT_FOUND; }); } -- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::GetYearDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::ClearYearDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::SetHolidaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - request.operatingMode - = static_cast>(params.operatingMode.unsignedCharValue); - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::GetHolidaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::ClearHolidaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::SetUser::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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); - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params - completionHandler: - (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::GetUser::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.userIndex = params.userIndex.unsignedShortValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::ClearUser::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.userIndex = params.userIndex.unsignedShortValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params - completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::SetCredential::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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); - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::GetCredentialStatus::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.credential.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::ClearCredential::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeLockStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeLockTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38620,179 +42989,688 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeDoorStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterBridgedDeviceBasic (Deprecated) + +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeVendorNameWithCompletion:completionHandler]; } - -- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self NewsubscribeAttributeVendorNameWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorNameWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorIDWithCompletion:completionHandler]; +} +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeVendorIDWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorIDWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)readAttributeProductNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductNameWithCompletion:completionHandler]; +} +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeProductNameWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductNameWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNodeLabelWithCompletion:completionHandler]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNodeLabelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNodeLabelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNodeLabelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNodeLabelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeHardwareVersionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionStringWithCompletion:completionHandler]; +} +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeHardwareVersionStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSoftwareVersionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionStringWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSoftwareVersionStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeManufacturingDateWithCompletion:completionHandler]; +} +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeManufacturingDateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeManufacturingDateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePartNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartNumberWithCompletion:completionHandler]; +} +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePartNumberWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartNumberWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeProductURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductURLWithCompletion:completionHandler]; +} +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeProductURLWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductURLWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductLabelWithCompletion:completionHandler]; +} +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeProductLabelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductLabelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSerialNumberWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSerialNumberWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSerialNumberWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeReachableWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReachableWithCompletion:completionHandler]; +} +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeReachableWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeReachableWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeUniqueIDWithCompletion:completionHandler]; +} +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeUniqueIDWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUniqueIDWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; } -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterSwitch + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38802,107 +43680,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38912,105 +43750,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39020,70 +43820,70 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRSwitchGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRSwitchGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39093,70 +43893,69 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRSwitchAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRSwitchAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39166,70 +43965,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRSwitchAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRSwitchAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39239,71 +44036,67 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39313,71 +44106,67 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39387,433 +44176,444 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterSwitch (Deprecated) + +- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNumberOfPositionsWithCompletion:completionHandler]; } - -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNumberOfPositionsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNumberOfPositionsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeCurrentPositionWithCompletion:completionHandler]; } - -- (void)subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeCurrentPositionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeCurrentPositionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeMultiPressMaxWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMultiPressMaxWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMultiPressMaxWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -+ (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterAdministratorCommissioning + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; } - return CHIP_ERROR_NOT_FOUND; - }); + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)readAttributeMinRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params + completion:(MTRStatusCompletion)completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; + request.PAKEVerifier = [self asByteSpan:params.pakeVerifier]; + request.discriminator = params.discriminator.unsignedShortValue; + request.iterations = params.iterations.unsignedIntValue; + request.salt = [self asByteSpan:params.salt]; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)revokeCommissioningWithCompletion:(MTRStatusCompletion)completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + [self revokeCommissioningWithParams:nil completion:completion]; +} +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + AdministratorCommissioning::Commands::RevokeCommissioning::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(self.callbackQueue, self.device, + completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge( + __block MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + auto successFn + = Callback::FromCancelable( + success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge * + innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable( + success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39823,70 +44623,68 @@ new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge( }); } -- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39896,106 +44694,68 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeLanguageWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40005,172 +44765,252 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; + __block MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; + __block MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -40183,11 +45023,11 @@ - (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)min // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -40196,19 +45036,18 @@ - (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)min params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -40224,106 +45063,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40333,184 +45133,647 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeOperatingModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterAdministratorCommissioning (Deprecated) + +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self openCommissioningWindowWithParams:params completion:completionHandler]; } - -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self openBasicCommissioningWindowWithParams:params completion:completionHandler]; } -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self revokeCommissioningWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)revokeCommissioningWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self revokeCommissioningWithParams:nil completion:completionHandler]; +} + +- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWindowStatusWithCompletion:completionHandler]; +} +- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeWindowStatusWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWindowStatusWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAdminFabricIndexWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAdminFabricIndexWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAdminFabricIndexWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAdminVendorIdWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAdminVendorIdWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAdminVendorIdWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterOperationalCredentials + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params + completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::AttestationRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.attestationNonce = [self asByteSpan:params.attestationNonce]; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params + completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::CertificateChainRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.certificateType = params.certificateType.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params + completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::CSRRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.CSRNonce = [self asByteSpan:params.csrNonce]; + if (params.isForUpdateNOC != nil) { + auto & definedValue_0 = request.isForUpdateNOC.Emplace(); + definedValue_0 = params.isForUpdateNOC.boolValue; + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::AddNOC::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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); + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::UpdateNOC::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.NOCValue = [self asByteSpan:params.nocValue]; + if (params.icacValue != nil) { + auto & definedValue_0 = request.ICACValue.Emplace(); + definedValue_0 = [self asByteSpan:params.icacValue]; + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::UpdateFabricLabel::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.label = [self asCharSpan:params.label]; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::RemoveFabric::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.fabricIndex = params.fabricIndex.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.rootCertificate = [self asByteSpan:params.rootCertificate]; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ // Make a copy of params before we go async. + params = [params copy]; + new MTROperationalCredentialsNOCsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + }); +} + +- (void)NewsubscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( + __block MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTROperationalCredentialsNOCsListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, +- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ // Make a copy of params before we go async. + params = [params copy]; + new MTROperationalCredentialsFabricsListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge( + __block MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTROperationalCredentialsFabricsListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40520,184 +45783,67 @@ new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge( }); } -- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40707,109 +45853,68 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40819,223 +45924,147 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return CHIP_ERROR_NOT_FOUND; }); } -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -41045,113 +46074,72 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge( + __block MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -41161,222 +46149,214 @@ new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge( }); } -- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTROperationalCredentialsAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; + __block MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTROperationalCredentialsAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -41386,107 +46366,67 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -41496,600 +46436,383 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterOperationalCredentials (Deprecated) + +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self attestationRequestWithParams:params completion:completionHandler]; } - -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self certificateChainRequestWithParams:params completion:completionHandler]; } -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self CSRRequestWithParams:params completion:completionHandler]; +} +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self addNOCWithParams:params completion:completionHandler]; +} +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self updateNOCWithParams:params completion:completionHandler]; +} +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self updateFabricLabelWithParams:params completion:completionHandler]; +} +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self removeFabricWithParams:params completion:completionHandler]; +} +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self addTrustedRootCertificateWithParams:params completion:completionHandler]; } -- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeNOCsWithParams:params completion:completionHandler]; +} +- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNOCsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNOCsWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFabricsWithParams:params completion:completionHandler]; +} +- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFabricsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFabricsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeSupportedFabricsWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSupportedFabricsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedFabricsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeCommissionedFabricsWithCompletion:completionHandler]; } - -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self NewsubscribeAttributeCommissionedFabricsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + [self readAttributeCommissionedFabricsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); +- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTrustedRootCertificatesWithCompletion:completionHandler]; } - -- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeTrustedRootCertificatesWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTrustedRootCertificatesWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeCurrentFabricIndexWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentFabricIndexWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentFabricIndexWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAttributeListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoorLockAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFeatureMapWithCompletion:completionHandler]; } - - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeClusterRevisionWithCompletion:completionHandler]; } - - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterDoorLock (Deprecated) - - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -42097,7 +46820,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterWindowCovering +@implementation MTRBaseClusterGroupKeyManagement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -42112,273 +46835,371 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)upOrOpenWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self upOrOpenWithParams:nil completionHandler:completionHandler]; -} -- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - WindowCovering::Commands::UpOrOpen::Type request; + GroupKeyManagement::Commands::KeySetWrite::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)downOrCloseWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self downOrCloseWithParams:nil completionHandler:completionHandler]; -} -- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params + completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - WindowCovering::Commands::DownOrClose::Type request; + GroupKeyManagement::Commands::KeySetRead::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)stopMotionWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self stopMotionWithParams:nil completionHandler:completionHandler]; -} -- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - WindowCovering::Commands::StopMotion::Type request; + GroupKeyManagement::Commands::KeySetRemove::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.groupKeySetID = params.groupKeySetID.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params + completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - WindowCovering::Commands::GoToLiftValue::Type request; + GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.liftValue = params.liftValue.unsignedShortValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.groupKeySetIDs.count != 0) { + auto * listHolder_0 = new ListHolder(params.groupKeySetIDs.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.groupKeySetIDs.count; ++i_0) { + if (![params.groupKeySetIDs[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) params.groupKeySetIDs[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedShortValue; + } + request.groupKeySetIDs = ListType_0(listHolder_0->mList, params.groupKeySetIDs.count); + } else { + request.groupKeySetIDs = ListType_0(); + } + } - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. +- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - WindowCovering::Commands::GoToLiftPercentage::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - WindowCovering::Commands::GoToTiltValue::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - request.tiltValue = params.tiltValue.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRGroupKeyManagementClusterGroupKeyMapStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRGroupKeyManagementClusterGroupKeyMapStruct *) value[i_0]; + listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; + listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - WindowCovering::Commands::GoToTiltPercentage::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - request.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringClusterTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ // Make a copy of params before we go async. + params = [params copy]; + new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge( + __block MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringClusterTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -42388,26 +47209,24 @@ new MTRWindowCoveringClusterTypeAttributeCallbackBridge( }); } -- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -42420,11 +47239,11 @@ - (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _No // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -42433,19 +47252,19 @@ - (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _No params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -42461,26 +47280,25 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -42493,11 +47311,11 @@ - (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _No // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -42506,19 +47324,19 @@ - (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _No params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -42534,218 +47352,288 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + __block MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + __block MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -42755,26 +47643,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -42787,11 +47673,11 @@ - (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Non // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -42800,19 +47686,18 @@ - (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Non params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -42828,144 +47713,393 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeConfigStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterGroupKeyManagement (Deprecated) + +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRWindowCoveringConfigStatusAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self keySetWriteWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self keySetReadWithParams:params completion:completionHandler]; +} +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self keySetRemoveWithParams:params completion:completionHandler]; +} +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self keySetReadAllIndicesWithParams:params completion:completionHandler]; +} - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGroupKeyMapWithParams:params completion:completionHandler]; +} +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeGroupKeyMapWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeGroupKeyMapWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGroupKeyMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGroupKeyMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWindowCoveringConfigStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGroupTableWithParams:params completion:completionHandler]; +} +- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGroupTableWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGroupTableWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxGroupsPerFabricWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxGroupsPerFabricWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxGroupsPerFabricWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxGroupKeysPerFabricWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxGroupKeysPerFabricWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxGroupKeysPerFabricWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterFixedLabel + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRFixedLabelLabelListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRFixedLabelLabelListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -42975,145 +48109,144 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringOperationalStatusAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge( + __block MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringOperationalStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -43123,71 +48256,68 @@ new MTRWindowCoveringOperationalStatusAttributeCallbackBridge( }); } -- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRFixedLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + __block MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -43197,71 +48327,67 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -43271,71 +48397,474 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterFixedLabel (Deprecated) + +- (void)readAttributeLabelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLabelListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLabelListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLabelListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterUserLabel + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRUserLabelLabelListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLabelListWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRUserLabelClusterLabelStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRUserLabelClusterLabelStruct *) value[i_0]; + listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; + listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRUserLabelLabelListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -43345,145 +48874,141 @@ new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge( }); } -- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + __block MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRUserLabelAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + __block MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRUserLabelAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -43493,70 +49018,67 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -43566,26 +49088,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -43598,11 +49118,11 @@ - (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _N // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -43611,19 +49131,18 @@ - (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _N params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -43639,143 +49158,280 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterUserLabel (Deprecated) + +- (void)readAttributeLabelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeLabelListWithCompletion:completionHandler]; +} +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLabelListWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLabelListWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLabelListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLabelListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterBooleanState + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; } - return CHIP_ERROR_NOT_FOUND; - }); + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -43785,178 +49441,144 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringModeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRWindowCoveringModeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWindowCoveringModeAttributeCallbackSubscriptionBridge( + __block MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWindowCoveringModeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringModeAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringSafetyStatusAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge( + __block MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringSafetyStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -43966,247 +49588,95 @@ new MTRWindowCoveringSafetyStatusAttributeCallbackBridge( }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanStateAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRBooleanStateAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRWindowCoveringAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRWindowCoveringAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -44219,11 +49689,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -44232,18 +49702,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -44259,25 +49729,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -44290,11 +49759,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -44303,19 +49772,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -44333,7 +49801,184 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterWindowCovering (Deprecated) +@implementation MTRBaseClusterBooleanState (Deprecated) + +- (void)readAttributeStateValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStateValueWithCompletion:completionHandler]; +} +- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeStateValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStateValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { @@ -44342,7 +49987,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterBarrierControl +@implementation MTRBaseClusterModeSelect - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -44357,128 +50002,166 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - BarrierControl::Commands::BarrierControlGoToPercent::Type request; + ModeSelect::Commands::ChangeToMode::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.percentOpen = params.percentOpen.unsignedCharValue; + request.newMode = params.newMode.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)barrierControlStopWithCompletionHandler:(StatusCompletion)completionHandler +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self barrierControlStopWithParams:nil completionHandler:completionHandler]; + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + +- (void)NewsubscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BarrierControl::Commands::BarrierControlStop::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44488,70 +50171,68 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRModeSelectSupportedModesListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRModeSelectSupportedModesListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44561,26 +50242,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -44593,11 +50272,11 @@ - (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnul // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -44606,19 +50285,18 @@ - (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -44634,26 +50312,25 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -44662,7 +50339,7 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -44673,68 +50350,73 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44744,26 +50426,25 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -44772,7 +50453,7 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -44783,68 +50464,72 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44854,111 +50539,285 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; + __block MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRModeSelectAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRModeSelectAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44968,67 +50827,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -45041,11 +50857,11 @@ - (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _ // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -45054,19 +50870,18 @@ - (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _ params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -45082,667 +50897,357 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterModeSelect (Deprecated) + +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self changeToModeWithParams:params completion:completionHandler]; } -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeDescriptionWithCompletion:completionHandler]; } -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeDescriptionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDescriptionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeStandardNamespaceWithCompletion:completionHandler]; +} +- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeStandardNamespaceWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeStandardNamespaceWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeSupportedModesWithCompletion:completionHandler]; } - -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self NewsubscribeAttributeSupportedModesWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeSupportedModesWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeCurrentModeWithCompletion:completionHandler]; } - -+ (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeCurrentModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeCurrentModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeStartUpModeWithCompletion:completionHandler]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeStartUpModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeOnModeWithCompletion:completionHandler]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOnModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnModeWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBarrierControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAttributeListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBarrierControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFeatureMapWithCompletion:completionHandler]; } - - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeClusterRevisionWithCompletion:completionHandler]; } - - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterBarrierControl (Deprecated) - - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -45750,7 +51255,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterPumpConfigurationAndControl +@implementation MTRBaseClusterDoorLock - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -45765,575 +51270,733 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::LockDoor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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]; + } + } + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::UnlockDoor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } + 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]; + } + } - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params completion:(MTRStatusCompletion)completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::UnlockWithTimeout::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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 err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetWeekDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } + 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; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params + completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetWeekDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params + completion:(MTRStatusCompletion)completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearWeekDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetYearDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + request.localStartTime = params.localStartTime.unsignedIntValue; + request.localEndTime = params.localEndTime.unsignedIntValue; - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params + completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetYearDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params + completion:(MTRStatusCompletion)completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearYearDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetHolidaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } + request.holidayIndex = params.holidayIndex.unsignedCharValue; + request.localStartTime = params.localStartTime.unsignedIntValue; + request.localEndTime = params.localEndTime.unsignedIntValue; + request.operatingMode + = static_cast>(params.operatingMode.unsignedCharValue); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params + completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetHolidaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + request.holidayIndex = params.holidayIndex.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params + completion:(MTRStatusCompletion)completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearHolidaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.holidayIndex = params.holidayIndex.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetUser::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } + 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); + } - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params + completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetUser::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + request.userIndex = params.userIndex.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completion:(MTRStatusCompletion)completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearUser::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.userIndex = params.userIndex.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params + completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetCredential::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } + 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); + } - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params + completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetCredentialStatus::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + request.credential.credentialType = static_cast>( + params.credential.credentialType.unsignedCharValue); + request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearCredential::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + __block MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + __block MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -46343,70 +52006,67 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -46416,141 +52076,176 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + __block MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} + new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} -- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -46560,69 +52255,105 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -46632,69 +52363,105 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -46704,301 +52471,290 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributePumpStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCapacityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47008,67 +52764,71 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47078,115 +52838,70 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47196,67 +52911,67 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47266,117 +52981,67 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47386,145 +53051,312 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeOperationModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + +- (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } + subscriptionEstablished); +} + ++ (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( + __block MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)readAttributeControlModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeControlModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -47533,7 +53365,7 @@ - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -47544,335 +53376,240 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} + value = [value copy]; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -47885,11 +53622,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -47898,18 +53635,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -47925,69 +53662,105 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47997,203 +53770,60 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterPumpConfigurationAndControl (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterThermostat - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Thermostat::Commands::SetpointRaiseLower::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.mode = static_cast>(params.mode.unsignedCharValue); - request.amount = params.amount.charValue; - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Thermostat::Commands::SetWeeklySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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(); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params - completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Thermostat::Commands::GetWeeklySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.daysToReturn - = static_cast>(params.daysToReturn.unsignedCharValue); - request.modeToReturn - = static_cast>(params.modeToReturn.unsignedCharValue); - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} + value = [value copy]; -- (void)clearWeeklyScheduleWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self clearWeeklyScheduleWithParams:nil completionHandler:completionHandler]; -} -- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( + new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Thermostat::Commands::ClearWeeklySchedule::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} -- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -48201,46 +53831,45 @@ - (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)m minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + __block MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -48250,70 +53879,71 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + __block MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -48323,213 +53953,183 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + __block MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + value = [value copy]; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -48539,143 +54139,107 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + value = [value copy]; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -48685,141 +54249,107 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + value = [value copy]; - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -48829,29 +54359,26 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -48860,7 +54387,7 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -48871,69 +54398,69 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -48943,29 +54470,26 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -48974,7 +54498,7 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -48985,23 +54509,23 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.charValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -49009,77 +54533,75 @@ - (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -49088,7 +54610,7 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -49099,69 +54621,68 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49171,29 +54692,26 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -49202,7 +54720,7 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -49213,69 +54731,69 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49285,29 +54803,25 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -49316,7 +54830,7 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)va new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -49327,69 +54841,67 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49399,29 +54911,26 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -49430,7 +54939,7 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)va new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -49441,69 +54950,69 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49513,26 +55022,25 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -49541,7 +55049,7 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -49552,69 +55060,68 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49624,108 +55131,143 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; + __block MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49735,108 +55277,68 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDoorLockAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + __block MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRDoorLockAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49846,108 +55348,67 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49957,108 +55418,67 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -50068,3114 +55488,1535 @@ new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterDoorLock (Deprecated) + +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self lockDoorWithParams:params completion:completionHandler]; } - -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self unlockDoorWithParams:params completion:completionHandler]; } -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self unlockWithTimeoutWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self setWeekDayScheduleWithParams:params completion:completionHandler]; } - -+ (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self getWeekDayScheduleWithParams:params completion:completionHandler]; } - -- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self clearWeekDayScheduleWithParams:params completion:completionHandler]; } - -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self setYearDayScheduleWithParams:params completion:completionHandler]; } -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self getYearDayScheduleWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self clearYearDayScheduleWithParams:params completion:completionHandler]; } - -+ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self setHolidayScheduleWithParams:params completion:completionHandler]; } - -- (void)readAttributeSystemModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self getHolidayScheduleWithParams:params completion:completionHandler]; } - -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self clearHolidayScheduleWithParams:params completion:completionHandler]; } -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self setUserWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params + completionHandler: + (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self getUserWithParams:params completion:completionHandler]; } - -+ (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self clearUserWithParams:params completion:completionHandler]; +} +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params + completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self setCredentialWithParams:params completion:completionHandler]; +} +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params + completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getCredentialStatusWithParams:params completion:completionHandler]; +} +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self clearCredentialWithParams:params completion:completionHandler]; } -- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLockStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeLockStateWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLockStateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLockStateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLockTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeLockTypeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLockTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLockTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActuatorEnabledWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActuatorEnabledWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActuatorEnabledWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDoorStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeDoorStateWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDoorStateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDoorStateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeDoorOpenEventsWithCompletion:completionHandler]; +} +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDoorOpenEventsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDoorOpenEventsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDoorOpenEventsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDoorOpenEventsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeDoorClosedEventsWithCompletion:completionHandler]; +} +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDoorClosedEventsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDoorClosedEventsWithValue:value params:params completion:completionHandler]; +} +- (void) + subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDoorClosedEventsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDoorClosedEventsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOpenPeriodWithCompletion:completionHandler]; +} +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOpenPeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOpenPeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOpenPeriodWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOpenPeriodWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNumberOfTotalUsersSupportedWithCompletion:completionHandler]; +} +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfTotalUsersSupportedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNumberOfPINUsersSupportedWithCompletion:completionHandler]; } - -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNumberOfPINUsersSupportedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNumberOfPINUsersSupportedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeNumberOfRFIDUsersSupportedWithCompletion:completionHandler]; } - -+ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, ++ (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:completionHandler]; } -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:completionHandler]; } - -- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:completionHandler]; } -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMaxPINCodeLengthWithCompletion:completionHandler]; } - -- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void) + subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeMaxPINCodeLengthWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxPINCodeLengthWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self readAttributeMinPINCodeLengthWithCompletion:completionHandler]; } -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void) + subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeMinPINCodeLengthWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeMinPINCodeLengthWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxRFIDCodeLengthWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxRFIDCodeLengthWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxRFIDCodeLengthWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMinRFIDCodeLengthWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMinRFIDCodeLengthWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinRFIDCodeLengthWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeCredentialRulesSupportWithCompletion:completionHandler]; } - -- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeCredentialRulesSupportWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeCredentialRulesSupportWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:completionHandler]; } - -- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLanguageWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeLanguageWithCompletion:completionHandler]; } - -- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeLanguageWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeLanguageWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeLanguageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeLanguageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeLEDSettingsWithCompletion:completionHandler]; } - -- (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeLEDSettingsWithValue:value params:nil completion:completionHandler]; } - -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeLEDSettingsWithValue:value params:params completion:completionHandler]; } -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeLEDSettingsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeLEDSettingsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAutoRelockTimeWithCompletion:completionHandler]; } - -- (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeAutoRelockTimeWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeAutoRelockTimeWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeAutoRelockTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAutoRelockTimeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeSoundVolumeWithCompletion:completionHandler]; } - -+ (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeSoundVolumeWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeSoundVolumeWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self NewsubscribeAttributeSoundVolumeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeSoundVolumeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeOperatingModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeOperatingModeWithCompletion:completionHandler]; } - -+ (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeOperatingModeWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeOperatingModeWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeOperatingModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeOperatingModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeSupportedOperatingModesWithCompletion:completionHandler]; } - -- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeSupportedOperatingModesWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeSupportedOperatingModesWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeDefaultConfigurationRegisterWithCompletion:completionHandler]; } - -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - [self writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self NewsubscribeAttributeDefaultConfigurationRegisterWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeDefaultConfigurationRegisterWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeEnableLocalProgrammingWithCompletion:completionHandler]; } - -+ (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeEnableLocalProgrammingWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeEnableLocalProgrammingWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeACTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self NewsubscribeAttributeEnableLocalProgrammingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeEnableLocalProgrammingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeEnableOneTouchLockingWithCompletion:completionHandler]; } - -+ (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeEnableOneTouchLockingWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeACCapacityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeEnableOneTouchLockingWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeACCapacityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self NewsubscribeAttributeEnableOneTouchLockingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeEnableOneTouchLockingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeEnableInsideStatusLEDWithCompletion:completionHandler]; } - -+ (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeEnableInsideStatusLEDWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeEnableInsideStatusLEDWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self NewsubscribeAttributeEnableInsideStatusLEDWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeEnableInsideStatusLEDWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeEnablePrivacyModeButtonWithCompletion:completionHandler]; } - -+ (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeEnablePrivacyModeButtonWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeEnablePrivacyModeButtonWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - [self writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self NewsubscribeAttributeEnablePrivacyModeButtonWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } + [self readAttributeEnablePrivacyModeButtonWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); +- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLocalProgrammingFeaturesWithCompletion:completionHandler]; } - -- (void)subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeLocalProgrammingFeaturesWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeLocalProgrammingFeaturesWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeLocalProgrammingFeaturesWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLocalProgrammingFeaturesWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeWrongCodeEntryLimitWithCompletion:completionHandler]; } -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeWrongCodeEntryLimitWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeWrongCodeEntryLimitWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeWrongCodeEntryLimitWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeWrongCodeEntryLimitWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeUserCodeTemporaryDisableTimeWithCompletion:completionHandler]; } -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeUserCodeTemporaryDisableTimeWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeUserCodeTemporaryDisableTimeWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeSendPINOverTheAirWithCompletion:completionHandler]; } - -- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSendPINOverTheAirWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSendPINOverTheAirWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeSendPINOverTheAirWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeSendPINOverTheAirWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRequirePINforRemoteOperationWithCompletion:completionHandler]; } - -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeRequirePINforRemoteOperationWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeRequirePINforRemoteOperationWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRequirePINforRemoteOperationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRequirePINforRemoteOperationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeExpiringUserTimeoutWithCompletion:completionHandler]; +} +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeExpiringUserTimeoutWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeExpiringUserTimeoutWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeExpiringUserTimeoutWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeExpiringUserTimeoutWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThermostatGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThermostatGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThermostatAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThermostatAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThermostatAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAttributeListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRThermostatAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFeatureMapWithCompletion:completionHandler]; } - - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeClusterRevisionWithCompletion:completionHandler]; } - - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterThermostat (Deprecated) - - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -53183,7 +57024,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterFanControl +@implementation MTRBaseClusterWindowCovering - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -53198,334 +57039,341 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)upOrOpenWithCompletion:(MTRStatusCompletion)completion +{ + [self upOrOpenWithParams:nil completion:completion]; +} +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params completion:(MTRStatusCompletion)completion { - new MTRFanControlClusterFanModeTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + WindowCovering::Commands::UpOrOpen::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)downOrCloseWithCompletion:(MTRStatusCompletion)completion { - [self writeAttributeFanModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self downOrCloseWithParams:nil completion:completion]; } -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( + new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + WindowCovering::Commands::DownOrClose::Type request; if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)stopMotionWithCompletion:(MTRStatusCompletion)completion +{ + [self stopMotionWithParams:nil completion:completion]; +} +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + WindowCovering::Commands::StopMotion::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params completion:(MTRStatusCompletion)completion { - new MTRFanControlClusterFanModeTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + WindowCovering::Commands::GoToLiftValue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.liftValue = params.liftValue.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params + completion:(MTRStatusCompletion)completion { - new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + WindowCovering::Commands::GoToLiftPercentage::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.liftPercent100thsValue = params.liftPercent100thsValue.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params completion:(MTRStatusCompletion)completion { - [self writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + WindowCovering::Commands::GoToTiltValue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.tiltValue = params.tiltValue.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + +- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( + new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + WindowCovering::Commands::GoToTiltPercentage::Type request; if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.tiltPercent100thsValue = params.tiltPercent100thsValue.unsignedShortValue; - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); +- (void)readAttributeTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWindowCoveringClusterTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( + __block MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePhysicalClosedLimitLiftWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributePercentSettingWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -53535,69 +57383,70 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePhysicalClosedLimitTiltWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -53607,67 +57456,69 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionLiftWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -53677,112 +57528,69 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionTiltWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -53792,68 +57600,70 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfActuationsLiftWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -53863,68 +57673,70 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeRockSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfActuationsTiltWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -53934,106 +57746,68 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeRockSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeConfigStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRWindowCoveringConfigStatusAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeRockSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -54043,68 +57817,71 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeWindSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionLiftPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -54114,106 +57891,142 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeWindSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionTiltPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeWindSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeOperationalStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWindowCoveringOperationalStatusAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -54223,220 +58036,217 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTargetPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRFanControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRFanControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTargetPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRFanControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRFanControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEndProductTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRFanControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRFanControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -54446,67 +58256,71 @@ new MTRFanControlAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -54516,69 +58330,71 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -54588,135 +58404,143 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterFanControl (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeInstalledOpenLimitLiftWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterThermostatUserInterfaceConfiguration - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } + subscriptionEstablished); +} + ++ (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeInstalledClosedLimitLiftWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -54726,107 +58550,143 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInstalledOpenLimitTiltWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } + subscriptionEstablished); +} + ++ (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeInstalledClosedLimitTiltWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -54836,29 +58696,25 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRWindowCoveringModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -54867,7 +58723,7 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnul new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -54878,69 +58734,138 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + __block MTRWindowCoveringModeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWindowCoveringModeAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWindowCoveringModeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWindowCoveringModeAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - auto successFn = Callback::FromCancelable(success); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWindowCoveringSafetyStatusAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)NewsubscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -54950,81 +58875,71 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable( - success); + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * - innerCallbackBridge - = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable( - success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -55034,81 +58949,70 @@ new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCall }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable( - success); + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * - innerCallbackBridge - = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable( - success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -55118,103 +59022,95 @@ new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallb }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, + new MTRWindowCoveringAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -55227,11 +59123,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -55240,18 +59136,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -55267,25 +59163,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -55298,11 +59193,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -55311,19 +59206,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -55341,908 +59235,1021 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterThermostatUserInterfaceConfiguration (Deprecated) +@implementation MTRBaseClusterWindowCovering (Deprecated) -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self upOrOpenWithParams:params completion:completionHandler]; } - -@end - -@implementation MTRBaseClusterColorControl - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)upOrOpenWithCompletionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self upOrOpenWithParams:nil completion:completionHandler]; } - -- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveToHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self downOrCloseWithParams:params completion:completionHandler]; } - -- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)downOrCloseWithCompletionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self downOrCloseWithParams:nil completion:completionHandler]; } - -- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::StepHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self stopMotionWithParams:params completion:completionHandler]; } - -- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)stopMotionWithCompletionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveToSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self stopMotionWithParams:nil completion:completionHandler]; } - -- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self goToLiftValueWithParams:params completion:completionHandler]; } - -- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::StepSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self goToLiftPercentageWithParams:params completion:completionHandler]; } - -- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveToHueAndSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self goToTiltValueWithParams:params completion:completionHandler]; } - -- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveToColor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self goToTiltPercentageWithParams:params completion:completionHandler]; } -- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveColor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.rateX = params.rateX.shortValue; - request.rateY = params.rateY.shortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributeTypeWithCompletion:completionHandler]; } - -- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::StepColor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self NewsubscribeAttributeTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveToColorTemperature::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.colorTemperature = params.colorTemperature.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributeTypeWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributePhysicalClosedLimitLiftWithCompletion:completionHandler]; } - -- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self NewsubscribeAttributePhysicalClosedLimitLiftWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalClosedLimitLiftWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::EnhancedStepHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributePhysicalClosedLimitTiltWithCompletion:completionHandler]; } - -- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self NewsubscribeAttributePhysicalClosedLimitTiltWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::ColorLoopSet::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributePhysicalClosedLimitTiltWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::StopMoveStep::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributeCurrentPositionLiftWithCompletion:completionHandler]; } - -- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveColorTemperature::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self NewsubscribeAttributeCurrentPositionLiftWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionLiftWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::StepColorTemperature::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + [self readAttributeCurrentPositionTiltWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentPositionTiltWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionTiltWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); +- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfActuationsLiftWithCompletion:completionHandler]; +} +- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNumberOfActuationsLiftWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfActuationsLiftWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNumberOfActuationsTiltWithCompletion:completionHandler]; +} +- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNumberOfActuationsTiltWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfActuationsTiltWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeConfigStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeConfigStatusWithCompletion:completionHandler]; +} +- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeConfigStatusWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeConfigStatusWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionLiftPercentageWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentPositionLiftPercentageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionLiftPercentageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeCurrentPositionTiltPercentageWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentPositionTiltPercentageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionTiltPercentageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeOperationalStatusWithCompletion:completionHandler]; } - -- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeOperationalStatusWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeOperationalStatusWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeTargetPositionLiftPercent100thsWithCompletion:completionHandler]; } - -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeTargetPositionLiftPercent100thsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeCurrentXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeTargetPositionTiltPercent100thsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTargetPositionTiltPercent100thsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; + [self readAttributeEndProductTypeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeEndProductTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEndProductTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionLiftPercent100thsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionTiltPercent100thsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInstalledOpenLimitLiftWithCompletion:completionHandler]; +} +- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInstalledOpenLimitLiftWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstalledOpenLimitLiftWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInstalledClosedLimitLiftWithCompletion:completionHandler]; +} +- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInstalledClosedLimitLiftWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstalledClosedLimitLiftWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInstalledOpenLimitTiltWithCompletion:completionHandler]; +} +- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInstalledOpenLimitTiltWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstalledOpenLimitTiltWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInstalledClosedLimitTiltWithCompletion:completionHandler]; +} +- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInstalledClosedLimitTiltWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstalledClosedLimitTiltWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeModeWithCompletion:completionHandler]; +} +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeModeWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSafetyStatusWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSafetyStatusWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSafetyStatusWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterBarrierControl + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + BarrierControl::Commands::BarrierControlGoToPercent::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.percentOpen = params.percentOpen.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion +{ + [self barrierControlStopWithParams:nil completion:completion]; +} +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + BarrierControl::Commands::BarrierControlStop::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -56252,24 +60259,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeCurrentYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -56282,11 +60289,11 @@ - (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterv // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -56295,18 +60302,19 @@ - (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterv params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -56322,25 +60330,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -56353,11 +60360,11 @@ - (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull) // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -56366,19 +60373,19 @@ - (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull) params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -56394,99 +60401,62 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } -+ (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -56499,11 +60469,11 @@ - (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Non // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -56512,19 +60482,18 @@ - (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Non params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -56540,67 +60509,106 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -56610,25 +60618,26 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -56637,7 +60646,7 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -56648,66 +60657,69 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -56717,97 +60729,64 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + value = [value copy]; -+ (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributePrimary1XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -56820,11 +60799,11 @@ - (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInter // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -56833,18 +60812,19 @@ - (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInter params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -56860,24 +60840,62 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary1YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -56890,11 +60908,11 @@ - (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInter // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -56903,18 +60921,18 @@ - (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInter params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -56930,97 +60948,62 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + value = [value copy]; -+ (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributePrimary2XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -57033,11 +61016,11 @@ - (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInter // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -57046,18 +61029,19 @@ - (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInter params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -57073,67 +61057,67 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary2YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -57143,283 +61127,215 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributePrimary3XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return CHIP_ERROR_NOT_FOUND; }); } -- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributePrimary3YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBarrierControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -57429,67 +61345,67 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributePrimary4XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -57499,24 +61415,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary4YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -57529,11 +61445,11 @@ - (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInter // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -57542,18 +61458,18 @@ - (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInter params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -57569,210 +61485,631 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterBarrierControl (Deprecated) + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self barrierControlGoToPercentWithParams:params completion:completionHandler]; +} +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self barrierControlStopWithParams:params completion:completionHandler]; +} +- (void)barrierControlStopWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self barrierControlStopWithParams:nil completion:completionHandler]; } -- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierMovingStateWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBarrierMovingStateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierMovingStateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierSafetyStatusWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBarrierSafetyStatusWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierSafetyStatusWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCapabilitiesWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBarrierCapabilitiesWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCapabilitiesWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierOpenEventsWithCompletion:completionHandler]; +} +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierOpenEventsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierOpenEventsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeBarrierOpenEventsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeBarrierOpenEventsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributePrimary5XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeBarrierCloseEventsWithCompletion:completionHandler]; } - -- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeBarrierCloseEventsWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + [self writeAttributeBarrierCloseEventsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBarrierCloseEventsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCloseEventsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCommandOpenEventsWithCompletion:completionHandler]; +} +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierCommandOpenEventsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierCommandOpenEventsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBarrierCommandOpenEventsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCommandOpenEventsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCommandCloseEventsWithCompletion:completionHandler]; +} +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierCommandCloseEventsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierCommandCloseEventsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBarrierCommandCloseEventsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCommandCloseEventsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierOpenPeriodWithCompletion:completionHandler]; +} +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierOpenPeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierOpenPeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBarrierOpenPeriodWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierOpenPeriodWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierClosePeriodWithCompletion:completionHandler]; +} +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierClosePeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierClosePeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBarrierClosePeriodWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierClosePeriodWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierPositionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBarrierPositionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierPositionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterPumpConfigurationAndControl + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; } - return CHIP_ERROR_NOT_FOUND; - }); + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)readAttributePrimary5YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -57782,70 +62119,67 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -57855,67 +62189,67 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributePrimary6XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -57925,67 +62259,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary6YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -57995,70 +62330,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -58068,106 +62401,68 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -58177,106 +62472,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -58286,106 +62543,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -58395,106 +62614,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -58504,115 +62685,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -58622,106 +62756,68 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -58731,106 +62827,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -58840,115 +62898,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -58958,215 +62969,367 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; + __block MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + __block MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); ++ (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; }); } -- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - auto successFn = Callback::FromCancelable(success); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)NewsubscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -59176,27 +63339,25 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -59205,7 +63366,7 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -59216,75 +63377,75 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; + nonNullValue_0 = value.unsignedIntValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -59294,69 +63455,67 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -59366,141 +63525,114 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + value = [value copy]; - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -59510,287 +63642,525 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - auto successFn = Callback::FromCancelable(success); + + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } -+ (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeControlModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } -+ (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + __block MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -59800,25 +64170,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -59831,11 +64200,11 @@ - (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull) // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -59844,19 +64213,18 @@ - (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull) params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -59872,714 +64240,868 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} +@end -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +@implementation MTRBaseClusterPumpConfigurationAndControl (Deprecated) + +- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeMaxPressureWithCompletion:completionHandler]; } - -+ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeMaxPressureWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeMaxPressureWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeMaxSpeedWithCompletion:completionHandler]; } - -+ (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeMaxSpeedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeMaxSpeedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeMaxFlowWithCompletion:completionHandler]; } - -+ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeMaxFlowWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeMaxFlowWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self readAttributeMinConstPressureWithCompletion:completionHandler]; } -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void) + subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeMinConstPressureWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeMinConstPressureWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMaxConstPressureWithCompletion:completionHandler]; } - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void) + subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRColorControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeMaxConstPressureWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeMaxConstPressureWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRColorControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMinCompPressureWithCompletion:completionHandler]; } - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRColorControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeMinCompPressureWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeMinCompPressureWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRColorControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMaxCompPressureWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxCompPressureWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxCompPressureWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRColorControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeMinConstSpeedWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMinConstSpeedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinConstSpeedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxConstSpeedWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self NewsubscribeAttributeMaxConstSpeedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxConstSpeedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinConstFlowWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMinConstFlowWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinConstFlowWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxConstFlowWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxConstFlowWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxConstFlowWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinConstTempWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMinConstTempWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinConstTempWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxConstTempWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxConstTempWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxConstTempWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePumpStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePumpStatusWithCompletion:completionHandler]; +} +- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePumpStatusWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePumpStatusWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeEffectiveOperationModeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeEffectiveOperationModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEffectiveOperationModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeEffectiveControlModeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeEffectiveControlModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEffectiveControlModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCapacityWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCapacityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCapacityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSpeedWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSpeedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSpeedWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLifetimeRunningHoursWithCompletion:completionHandler]; +} +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLifetimeRunningHoursWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLifetimeRunningHoursWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLifetimeRunningHoursWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLifetimeRunningHoursWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerWithCompletion:completionHandler]; +} +- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePowerWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLifetimeEnergyConsumedWithCompletion:completionHandler]; +} +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLifetimeEnergyConsumedWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLifetimeEnergyConsumedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLifetimeEnergyConsumedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOperationModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOperationModeWithCompletion:completionHandler]; +} +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOperationModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOperationModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOperationModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOperationModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeControlModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeControlModeWithCompletion:completionHandler]; +} +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeControlModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeControlModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeControlModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeControlModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRColorControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFeatureMapWithCompletion:completionHandler]; } - - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeClusterRevisionWithCompletion:completionHandler]; } - - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterColorControl (Deprecated) - - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -60587,7 +65109,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterBallastConfiguration +@implementation MTRBaseClusterThermostat - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -60602,69 +65124,221 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params + completion:(MTRStatusCompletion)completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Thermostat::Commands::SetpointRaiseLower::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.mode = static_cast>(params.mode.unsignedCharValue); + request.amount = params.amount.charValue; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Thermostat::Commands::SetWeeklySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } - using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + 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(); + } + } + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params + completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Thermostat::Commands::GetWeeklySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.daysToReturn + = static_cast>(params.daysToReturn.unsignedCharValue); + request.modeToReturn + = static_cast>(params.modeToReturn.unsignedCharValue); + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion +{ + [self clearWeeklyScheduleWithParams:nil completion:completion]; +} +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); }, - subscriptionEstablishedHandler); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Thermostat::Commands::ClearWeeklySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -60674,25 +65348,95 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -60705,11 +65449,11 @@ - (void)subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)m // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -60718,19 +65462,18 @@ - (void)subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)m params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -60746,69 +65489,70 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeBallastStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -60818,105 +65562,70 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeMinLevelWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -60926,105 +65635,143 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } + subscriptionEstablished); +} + ++ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -61034,117 +65781,137 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); +- (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -61154,29 +65921,26 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -61185,7 +65949,7 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)val new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -61196,102 +65960,25 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeLampQuantityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -61304,11 +65991,11 @@ - (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minIn // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -61317,19 +66004,19 @@ - (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minIn params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -61345,26 +66032,26 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeLampTypeWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampTypeWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -61373,7 +66060,7 @@ - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -61384,67 +66071,69 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -61454,26 +66143,26 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeLampManufacturerWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampManufacturerWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -61482,7 +66171,7 @@ - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -61493,69 +66182,69 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -61565,26 +66254,26 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeLampRatedHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -61593,7 +66282,7 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -61604,74 +66293,69 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -61681,26 +66365,26 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeLampBurnHoursWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -61709,7 +66393,7 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -61720,74 +66404,69 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -61797,26 +66476,26 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeLampAlarmModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -61825,7 +66504,7 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -61836,68 +66515,69 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -61907,29 +66587,25 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -61938,7 +66614,7 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -61949,75 +66625,69 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -62027,292 +66697,217 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + value = [value copy]; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBallastConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + value = [value copy]; -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRBallastConfigurationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -62322,69 +66917,107 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. + [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -62394,96 +67027,106 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterBallastConfiguration (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -@end - -@implementation MTRBaseClusterIlluminanceMeasurement - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -62493,23 +67136,60 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -62517,46 +67197,44 @@ - (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)m minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -62566,70 +67244,219 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + __block MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -62639,67 +67466,69 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -62709,70 +67538,67 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -62782,293 +67608,143 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -63078,69 +67754,108 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -63150,96 +67865,115 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterIlluminanceMeasurement (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -@end - -@implementation MTRBaseClusterTemperatureMeasurement - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -63249,70 +67983,109 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion +{ + [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -63322,25 +68095,170 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatRunningStateWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -63354,11 +68272,11 @@ - (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)m // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -63367,19 +68285,19 @@ - (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)m params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -63395,67 +68313,70 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -63465,293 +68386,255 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -63761,168 +68644,111 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + value = [value copy]; - chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -@end - -@implementation MTRBaseClusterTemperatureMeasurement (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterPressureMeasurement - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -63932,70 +68758,70 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -64005,70 +68831,70 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -64078,67 +68904,106 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -64148,69 +69013,104 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeACTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -64220,171 +69120,62 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeACCapacityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} + value = [value copy]; -- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -64397,11 +69188,11 @@ - (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -64410,19 +69201,18 @@ - (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -64438,66 +69228,105 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -64507,249 +69336,170 @@ new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + value = [value copy]; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRPressureMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + value = [value copy]; -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRPressureMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -64762,11 +69512,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -64775,18 +69525,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -64802,69 +69552,105 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -64874,96 +69660,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterPressureMeasurement (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterFlowMeasurement - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -64973,213 +69731,105 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + value = [value copy]; -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -65189,73 +69839,71 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThermostatGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRThermostatGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -65265,72 +69913,70 @@ new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThermostatAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRThermostatAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -65340,97 +69986,95 @@ new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRFlowMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThermostatAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRFlowMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRThermostatAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -65443,11 +70087,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -65456,18 +70100,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -65483,25 +70127,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -65514,11 +70157,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -65527,19 +70170,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -65557,3489 +70199,1961 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterFlowMeasurement (Deprecated) +@implementation MTRBaseClusterThermostat (Deprecated) -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self setpointRaiseLowerWithParams:params completion:completionHandler]; } - -@end - -@implementation MTRBaseClusterRelativeHumidityMeasurement - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self setWeeklyScheduleWithParams:params completion:completionHandler]; } - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params + completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self getWeeklyScheduleWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self clearWeeklyScheduleWithParams:params completion:completionHandler]; } - -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)clearWeeklyScheduleWithCompletionHandler:(MTRStatusCompletion)completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self clearWeeklyScheduleWithParams:nil completion:completionHandler]; } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeLocalTemperatureWithCompletion:completionHandler]; } - -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeLocalTemperatureWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeLocalTemperatureWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeOutdoorTemperatureWithCompletion:completionHandler]; } - -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeOutdoorTemperatureWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeOutdoorTemperatureWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeOccupancyWithCompletion:completionHandler]; } - -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeOccupancyWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeOccupancyWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAbsMinHeatSetpointLimitWithCompletion:completionHandler]; } - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAbsMinHeatSetpointLimitWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, - completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAbsMaxHeatSetpointLimitWithCompletion:completionHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAbsMinCoolSetpointLimitWithCompletion:completionHandler]; } - -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAbsMinCoolSetpointLimitWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAbsMaxCoolSetpointLimitWithCompletion:completionHandler]; } - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePICoolingDemandWithCompletion:completionHandler]; +} +- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePICoolingDemandWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePICoolingDemandWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributePIHeatingDemandWithCompletion:completionHandler]; } - -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributePIHeatingDemandWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePIHeatingDemandWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterRelativeHumidityMeasurement (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeHVACSystemTypeConfigurationWithCompletion:completionHandler]; } - -@end - -@implementation MTRBaseClusterOccupancySensing - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeHVACSystemTypeConfigurationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeHVACSystemTypeConfigurationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeLocalTemperatureCalibrationWithCompletion:completionHandler]; } - -- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self writeAttributeLocalTemperatureCalibrationWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLocalTemperatureCalibrationWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLocalTemperatureCalibrationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLocalTemperatureCalibrationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupiedCoolingSetpointWithCompletion:completionHandler]; +} +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedCoolingSetpointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedCoolingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOccupiedCoolingSetpointWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupiedCoolingSetpointWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeOccupiedHeatingSetpointWithCompletion:completionHandler]; +} +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedHeatingSetpointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedHeatingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOccupiedHeatingSetpointWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupiedHeatingSetpointWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeUnoccupiedCoolingSetpointWithCompletion:completionHandler]; } - -- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedCoolingSetpointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedCoolingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeUnoccupiedCoolingSetpointWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeUnoccupiedHeatingSetpointWithCompletion:completionHandler]; } - -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeUnoccupiedHeatingSetpointWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeUnoccupiedHeatingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUnoccupiedHeatingSetpointWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeMinHeatSetpointLimitWithCompletion:completionHandler]; } - -+ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeMinHeatSetpointLimitWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeMinHeatSetpointLimitWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self NewsubscribeAttributeMinHeatSetpointLimitWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeMinHeatSetpointLimitWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeMaxHeatSetpointLimitWithCompletion:completionHandler]; } - -+ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeMaxHeatSetpointLimitWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeMaxHeatSetpointLimitWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self NewsubscribeAttributeMaxHeatSetpointLimitWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeMaxHeatSetpointLimitWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeMinCoolSetpointLimitWithCompletion:completionHandler]; } - -+ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeMinCoolSetpointLimitWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeMinCoolSetpointLimitWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self NewsubscribeAttributeMinCoolSetpointLimitWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeMinCoolSetpointLimitWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeMaxCoolSetpointLimitWithCompletion:completionHandler]; } - -+ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeMaxCoolSetpointLimitWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeMaxCoolSetpointLimitWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self NewsubscribeAttributeMaxCoolSetpointLimitWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeMaxCoolSetpointLimitWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeMinSetpointDeadBandWithCompletion:completionHandler]; } - -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeMinSetpointDeadBandWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeMinSetpointDeadBandWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self NewsubscribeAttributeMinSetpointDeadBandWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeMinSetpointDeadBandWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeRemoteSensingWithCompletion:completionHandler]; } - -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeRemoteSensingWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeRemoteSensingWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self NewsubscribeAttributeRemoteSensingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeRemoteSensingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeControlSequenceOfOperationWithCompletion:completionHandler]; } - -+ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeControlSequenceOfOperationWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeControlSequenceOfOperationWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self NewsubscribeAttributeControlSequenceOfOperationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeControlSequenceOfOperationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeSystemModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeSystemModeWithCompletion:completionHandler]; } - -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeSystemModeWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeSystemModeWithValue:value params:params completion:completionHandler]; } - -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self NewsubscribeAttributeSystemModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self readAttributeSystemModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeThermostatRunningModeWithCompletion:completionHandler]; } - -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeThermostatRunningModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeThermostatRunningModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeStartOfWeekWithCompletion:completionHandler]; } - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeStartOfWeekWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeStartOfWeekWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeNumberOfWeeklyTransitionsWithCompletion:completionHandler]; } - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTROccupancySensingAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNumberOfWeeklyTransitionsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeNumberOfDailyTransitionsWithCompletion:completionHandler]; } - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new MTROccupancySensingAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeNumberOfDailyTransitionsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNumberOfDailyTransitionsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeTemperatureSetpointHoldWithCompletion:completionHandler]; } - -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeTemperatureSetpointHoldWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeTemperatureSetpointHoldWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeTemperatureSetpointHoldWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeTemperatureSetpointHoldWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterOccupancySensing (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeTemperatureSetpointHoldDurationWithCompletion:completionHandler]; } - -@end - -@implementation MTRBaseClusterWakeOnLan - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self writeAttributeTemperatureSetpointHoldDurationWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeMACAddressWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeTemperatureSetpointHoldDurationWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self NewsubscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTemperatureSetpointHoldDurationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeThermostatProgrammingOperationModeWithCompletion:completionHandler]; +} +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeThermostatProgrammingOperationModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeThermostatProgrammingOperationModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeThermostatProgrammingOperationModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeThermostatProgrammingOperationModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeThermostatRunningStateWithCompletion:completionHandler]; +} +- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeThermostatRunningStateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeThermostatRunningStateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeSetpointChangeSourceWithCompletion:completionHandler]; } - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeSetpointChangeSourceWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeSetpointChangeSourceWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeSetpointChangeAmountWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSetpointChangeAmountWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSetpointChangeAmountWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRWakeOnLanAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeSetpointChangeSourceTimestampWithCompletion:completionHandler]; } - -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new MTRWakeOnLanAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeSetpointChangeSourceTimestampWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeSetpointChangeSourceTimestampWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeOccupiedSetbackWithCompletion:completionHandler]; } - -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeOccupiedSetbackWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeOccupiedSetbackWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeOccupiedSetbackWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeOccupiedSetbackWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterWakeOnLan (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeOccupiedSetbackMinWithCompletion:completionHandler]; } - -@end - -@implementation MTRBaseClusterChannel - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self NewsubscribeAttributeOccupiedSetbackMinWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params - completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRChannelClusterChangeChannelResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Channel::Commands::ChangeChannel::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.match = [self asCharSpan:params.match]; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributeOccupiedSetbackMinWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Channel::Commands::ChangeChannelByNumber::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.majorNumber = params.majorNumber.unsignedShortValue; - request.minorNumber = params.minorNumber.unsignedShortValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributeOccupiedSetbackMaxWithCompletion:completionHandler]; } - -- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Channel::Commands::SkipChannel::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.count = params.count.unsignedShortValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self NewsubscribeAttributeOccupiedSetbackMaxWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeChannelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelChannelListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeOccupiedSetbackMaxWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRChannelChannelListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRChannelChannelListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRChannelChannelListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeUnoccupiedSetbackWithCompletion:completionHandler]; } - -+ (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRChannelChannelListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeUnoccupiedSetbackWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeLineupWithCompletionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRChannelLineupStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeUnoccupiedSetbackWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRChannelLineupStructAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRChannelLineupStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRChannelLineupStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeUnoccupiedSetbackWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelLineupStructAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeUnoccupiedSetbackWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRChannelCurrentChannelStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeUnoccupiedSetbackMinWithCompletion:completionHandler]; } - -- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self NewsubscribeAttributeUnoccupiedSetbackMinWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUnoccupiedSetbackMinWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUnoccupiedSetbackMaxWithCompletion:completionHandler]; +} +- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeUnoccupiedSetbackMaxWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUnoccupiedSetbackMaxWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRChannelCurrentChannelStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeEmergencyHeatDeltaWithCompletion:completionHandler]; +} +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEmergencyHeatDeltaWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEmergencyHeatDeltaWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeEmergencyHeatDeltaWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEmergencyHeatDeltaWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACTypeWithCompletion:completionHandler]; +} +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACTypeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACTypeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeACTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACTypeWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeACCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACCapacityWithCompletion:completionHandler]; +} +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCapacityWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCapacityWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeACCapacityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACCapacityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeACRefrigerantTypeWithCompletion:completionHandler]; +} +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACRefrigerantTypeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACRefrigerantTypeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeACRefrigerantTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACRefrigerantTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeACCompressorTypeWithCompletion:completionHandler]; +} +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCompressorTypeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCompressorTypeWithValue:value params:params completion:completionHandler]; +} +- (void) + subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeACCompressorTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACCompressorTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACErrorCodeWithCompletion:completionHandler]; +} +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACErrorCodeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACErrorCodeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeACErrorCodeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACErrorCodeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeACLouverPositionWithCompletion:completionHandler]; +} +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACLouverPositionWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACLouverPositionWithValue:value params:params completion:completionHandler]; +} +- (void) + subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeACLouverPositionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACLouverPositionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeACCoilTemperatureWithCompletion:completionHandler]; +} +- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeACCoilTemperatureWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACCoilTemperatureWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeACCapacityformatWithCompletion:completionHandler]; +} +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCapacityformatWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCapacityformatWithValue:value params:params completion:completionHandler]; +} +- (void) + subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeACCapacityformatWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACCapacityformatWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAttributeListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRChannelAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRChannelAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRChannelAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRChannelAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFeatureMapWithCompletion:completionHandler]; } - - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeClusterRevisionWithCompletion:completionHandler]; } - - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterChannel (Deprecated) - - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -69047,7 +72161,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterTargetNavigator +@implementation MTRBaseClusterFanControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -69062,170 +72176,105 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params - completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRFanControlClusterFanModeTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeFanModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TargetNavigator::Commands::NavigateTarget::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - request.target = params.target.unsignedCharValue; - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asCharSpan:params.data]; - } - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} -- (void)readAttributeTargetListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRTargetNavigatorTargetListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge( + __block MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRTargetNavigatorTargetListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRFanControlClusterFanModeTypeAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -69235,148 +72284,107 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + value = [value copy]; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -69386,140 +72394,181 @@ new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTargetNavigatorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributePercentSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTargetNavigatorAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -69529,69 +72578,66 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -69601,474 +72647,181 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterTargetNavigator (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -@end - -@implementation MTRBaseClusterMediaPlayback - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)playWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self playWithParams:nil completionHandler:completionHandler]; -} -- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::Play::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)pauseWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self pauseWithParams:nil completionHandler:completionHandler]; -} -- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::Pause::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)stopPlaybackWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self stopPlaybackWithParams:nil completionHandler:completionHandler]; -} -- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::StopPlayback::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)startOverWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self startOverWithParams:nil completionHandler:completionHandler]; -} -- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::StartOver::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)previousWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self previousWithParams:nil completionHandler:completionHandler]; -} -- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::Previous::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)nextWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self nextWithParams:nil completionHandler:completionHandler]; -} -- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::Next::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self rewindWithParams:nil completionHandler:completionHandler]; -} -- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::Rewind::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self fastForwardWithParams:nil completionHandler:completionHandler]; -} -- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::FastForward::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - -- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::SkipForward::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} + value = [value copy]; -- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::SkipBackward::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} -- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - MediaPlayback::Commands::Seek::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; } - request.position = params.position.unsignedLongLongValue; - - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} -- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeStartTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -70078,68 +72831,67 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeDurationWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -70149,143 +72901,105 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRockSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + value = [value copy]; -+ (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRFloatAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRFloatAttributeCallbackSubscriptionBridge * callbackBridge = new MTRFloatAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFloatAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -70295,69 +73009,67 @@ new MTRFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -70367,23 +73079,60 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeWindSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -70391,46 +73140,44 @@ - (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)min minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -70440,72 +73187,71 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRFanControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRFanControlGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -70515,72 +73261,70 @@ new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRFanControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRFanControlAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -70590,97 +73334,95 @@ new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRMediaPlaybackAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRFanControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRMediaPlaybackAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRFanControlAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -70693,11 +73435,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -70706,18 +73448,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -70733,25 +73475,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -70764,11 +73505,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -70777,19 +73518,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -70807,573 +73547,660 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterMediaPlayback (Deprecated) +@implementation MTRBaseClusterFanControl (Deprecated) -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeFanModeWithCompletion:completionHandler]; } - -@end - -@implementation MTRBaseClusterMediaInput - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self writeAttributeFanModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeFanModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFanModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFanModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaInput::Commands::SelectInput::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.index = params.index.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributeFanModeSequenceWithCompletion:completionHandler]; } - -- (void)showInputStatusWithCompletionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self showInputStatusWithParams:nil completionHandler:completionHandler]; + [self writeAttributeFanModeSequenceWithValue:value params:nil completion:completionHandler]; } -- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaInput::Commands::ShowInputStatus::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self writeAttributeFanModeSequenceWithValue:value params:params completion:completionHandler]; } - -- (void)hideInputStatusWithCompletionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self hideInputStatusWithParams:nil completionHandler:completionHandler]; + [self NewsubscribeAttributeFanModeSequenceWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } -- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaInput::Commands::HideInputStatus::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributeFanModeSequenceWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaInput::Commands::RenameInput::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.index = params.index.unsignedCharValue; - request.name = [self asCharSpan:params.name]; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self readAttributePercentSettingWithCompletion:completionHandler]; } - -- (void)readAttributeInputListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRMediaInputInputListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributePercentSettingWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRMediaInputInputListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRMediaInputInputListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self writeAttributePercentSettingWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePercentSettingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePercentSettingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRMediaInputInputListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePercentCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePercentCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePercentCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaInputInputListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeSpeedMaxWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSpeedMaxWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSpeedMaxWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)( +- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeSpeedSettingWithCompletion:completionHandler]; } - -- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSpeedSettingWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSpeedSettingWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeSpeedSettingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSpeedSettingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSpeedCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSpeedCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeSpeedCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRockSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRockSupportWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRockSupportWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRockSupportWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRockSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRockSettingWithCompletion:completionHandler]; +} +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRockSettingWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRockSettingWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRockSettingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRockSettingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeWindSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWindSupportWithCompletion:completionHandler]; +} +- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeWindSupportWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWindSupportWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeWindSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWindSettingWithCompletion:completionHandler]; +} +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeWindSettingWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeWindSettingWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeWindSettingWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWindSettingWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaInputAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAttributeListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRMediaInputAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterThermostatUserInterfaceConfiguration + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -71383,69 +74210,105 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -71455,128 +74318,191 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterMediaInput (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterLowPower - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)sleepWithCompletionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self sleepWithParams:nil completionHandler:completionHandler]; + [self writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - LowPower::Commands::Sleep::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable( + success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * + innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable( + success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -71586,72 +74512,79 @@ new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, + completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable( + success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * + innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable( + success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -71661,70 +74594,74 @@ new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLowPowerAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRLowPowerAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -71734,24 +74671,24 @@ new MTRLowPowerAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -71764,11 +74701,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -71777,18 +74714,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71804,25 +74741,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -71835,11 +74771,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -71848,19 +74784,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -71878,424 +74813,281 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterLowPower (Deprecated) +@implementation MTRBaseClusterThermostatUserInterfaceConfiguration (Deprecated) -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeTemperatureDisplayModeWithCompletion:completionHandler]; } - -@end - -@implementation MTRBaseClusterKeypadInput - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self writeAttributeTemperatureDisplayModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeTemperatureDisplayModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTemperatureDisplayModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTemperatureDisplayModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - completionHandler: - (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - new MTRKeypadInputClusterSendKeyResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - KeypadInput::Commands::SendKey::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.keyCode = static_cast>(params.keyCode.unsignedCharValue); + [self readAttributeKeypadLockoutWithCompletion:completionHandler]; +} +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeKeypadLockoutWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeKeypadLockoutWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeKeypadLockoutWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeKeypadLockoutWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); +- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeScheduleProgrammingVisibilityWithCompletion:completionHandler]; +} +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeScheduleProgrammingVisibilityWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeScheduleProgrammingVisibilityWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeScheduleProgrammingVisibilityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeScheduleProgrammingVisibilityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRKeypadInputAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAttributeListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRKeypadInputAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFeatureMapWithCompletion:completionHandler]; } - - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeClusterRevisionWithCompletion:completionHandler]; } - - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterKeypadInput (Deprecated) - - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; @@ -72303,7 +75095,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterContentLauncher +@implementation MTRBaseClusterColorControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -72318,682 +75110,662 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params - completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - ContentLauncher::Commands::LaunchContent::Type request; + ColorControl::Commands::MoveToHue::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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:[MTRContentLauncherClusterParameter class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (MTRContentLauncherClusterParameter *) 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:[MTRContentLauncherClusterAdditionalInfo class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_4 = (MTRContentLauncherClusterAdditionalInfo *) 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.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; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.autoPlay = params.autoPlay.boolValue; - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asCharSpan:params.data]; - } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params - completionHandler: - (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - ContentLauncher::Commands::LaunchURL::Type request; + ColorControl::Commands::StepHue::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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); - } - } + 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; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveToSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } + request.saturation = params.saturation.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params completion:(MTRStatusCompletion)completion { - new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::StepSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } + 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; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params + completion:(MTRStatusCompletion)completion { - new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveToHueAndSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; + 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; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completion:(MTRStatusCompletion)completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveToColor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( + new MTRCommandSuccessCallbackBridge( self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveColor::Type request; if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.rateX = params.rateX.shortValue; + request.rateY = params.rateY.shortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::StepColor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + 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; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params + completion:(MTRStatusCompletion)completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveToColorTemperature::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} + request.colorTemperature = params.colorTemperature.unsignedShortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::EnhancedMoveToHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } + 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; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params completion:(MTRStatusCompletion)completion { - new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::EnhancedMoveHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params completion:(MTRStatusCompletion)completion { - new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::EnhancedStepHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } + 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; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params completion:(MTRStatusCompletion)completion { - new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::ColorLoopSet::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; + 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; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params completion:(MTRStatusCompletion)completion { - new MTRContentLauncherAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::StopMoveStep::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveColorTemperature::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + } + 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; - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params + completion:(MTRStatusCompletion)completion { - new MTRContentLauncherAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::StepColorTemperature::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; + 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; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -73003,69 +75775,67 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -73075,224 +75845,136 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterContentLauncher (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterAudioOutput - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - AudioOutput::Commands::SelectOutput::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.index = params.index.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - AudioOutput::Commands::RenameOutput::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.index = params.index.unsignedCharValue; - request.name = [self asCharSpan:params.name]; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeOutputListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAudioOutputOutputListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAudioOutputOutputListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -73302,290 +75984,280 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRAudioOutputAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRAudioOutputAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -73595,69 +76267,66 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -73667,597 +76336,453 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterAudioOutput (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -@end - -@implementation MTRBaseClusterApplicationLauncher - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ApplicationLauncher::Commands::LaunchApp::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; - request.application.applicationId = [self asCharSpan:params.application.applicationId]; - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asByteSpan:params.data]; - } - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ApplicationLauncher::Commands::StopApp::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; - request.application.applicationId = [self asCharSpan:params.application.applicationId]; - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ApplicationLauncher::Commands::HideApp::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; - request.application.applicationId = [self asCharSpan:params.application.applicationId]; - - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCatalogListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationLauncherCatalogListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationLauncherCatalogListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.application.catalogVendorId = value.application.catalogVendorId.unsignedShortValue; - nonNullValue_0.application.applicationId = [self asCharSpan:value.application.applicationId]; - if (value.endpoint != nil) { - auto & definedValue_2 = nonNullValue_0.endpoint.Emplace(); - definedValue_2 = value.endpoint.unsignedShortValue; - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationLauncherAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationLauncherAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -74267,25 +76792,23 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -74298,11 +76821,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -74311,19 +76834,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -74339,94 +76861,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterApplicationLauncher (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterApplicationBasic - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -74436,67 +76932,66 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRVendorIdAttributeCallbackSubscriptionBridge * callbackBridge = new MTRVendorIdAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRVendorIdAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -74506,70 +77001,137 @@ new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -74579,24 +77141,23 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeProductIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -74609,11 +77170,11 @@ - (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInter // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -74622,18 +77183,18 @@ - (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInter params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -74649,218 +77210,275 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeApplicationWithCompletionHandler: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicApplicationStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicApplicationStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -74870,366 +77488,385 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRApplicationBasicAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -75239,25 +77876,62 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -75270,11 +77944,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -75283,19 +77957,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75311,409 +77984,437 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterApplicationBasic (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -@end - -@implementation MTRBaseClusterAccountLogin - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + [self writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params - completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - AccountLogin::Commands::GetSetupPIN::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - AccountLogin::Commands::Login::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; - request.setupPIN = [self asCharSpan:params.setupPIN]; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)logoutWithCompletionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self logoutWithParams:nil completionHandler:completionHandler]; + [self writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - AccountLogin::Commands::Logout::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + value = [value copy]; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRAccountLoginAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRAccountLoginAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -75723,23 +78424,60 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -75754,11 +78492,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -75767,19 +78505,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -75795,156 +78532,113 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -@end - -@implementation MTRBaseClusterAccountLogin (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterElectricalMeasurement - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)getProfileInfoCommandWithCompletionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self getProfileInfoCommandWithParams:nil completionHandler:completionHandler]; + [self writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ElectricalMeasurement::Commands::GetProfileInfoCommand::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; } - request.attributeId = params.attributeId.unsignedShortValue; - request.startTime = params.startTime.unsignedIntValue; - request.numberOfIntervals = params.numberOfIntervals.unsignedCharValue; - - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} -- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -75954,67 +78648,105 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcVoltageWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -76024,68 +78756,105 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -76095,68 +78864,113 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } -+ (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -76166,67 +78980,68 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -76236,68 +79051,67 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -76307,68 +79121,67 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -76378,66 +79191,68 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -76447,67 +79262,67 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -76517,67 +79332,70 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -76587,26 +79405,26 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -76619,11 +79437,11 @@ - (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnul // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -76632,19 +79450,19 @@ - (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76660,25 +79478,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -76691,11 +79508,11 @@ - (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)m // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -76704,19 +79521,18 @@ - (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)m params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76732,26 +79548,26 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -76764,11 +79580,11 @@ - (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnul // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -76777,19 +79593,19 @@ - (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76805,25 +79621,26 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -76836,11 +79653,11 @@ - (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)m // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -76849,19 +79666,19 @@ - (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)m params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76877,25 +79694,26 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -76908,11 +79726,11 @@ - (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull) // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -76921,19 +79739,19 @@ - (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull) params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -76949,140 +79767,114 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + value = [value copy]; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -77092,213 +79884,215 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRColorControlGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRColorControlGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRColorControlAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRColorControlAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRColorControlAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRColorControlAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -77308,69 +80102,67 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32sAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -77380,23 +80172,22 @@ new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -77404,45 +80195,44 @@ - (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -77452,3452 +80242,1962 @@ new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterColorControl (Deprecated) + +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self moveToHueWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self moveHueWithParams:params completion:completionHandler]; } - -+ (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self stepHueWithParams:params completion:completionHandler]; } - -- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self moveToSaturationWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self moveSaturationWithParams:params completion:completionHandler]; } - -+ (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self stepSaturationWithParams:params completion:completionHandler]; } - -- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self moveToHueAndSaturationWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self moveToColorWithParams:params completion:completionHandler]; } - -+ (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self moveColorWithParams:params completion:completionHandler]; } - -- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self stepColorWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self moveToColorTemperatureWithParams:params completion:completionHandler]; } - -+ (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self enhancedMoveToHueWithParams:params completion:completionHandler]; } - -- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self enhancedMoveHueWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self enhancedStepHueWithParams:params completion:completionHandler]; } - -+ (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self enhancedMoveToHueAndSaturationWithParams:params completion:completionHandler]; } - -- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self colorLoopSetWithParams:params completion:completionHandler]; } - -- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self stopMoveStepWithParams:params completion:completionHandler]; } - -+ (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self moveColorTemperatureWithParams:params completion:completionHandler]; } - -- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self stepColorTemperatureWithParams:params completion:completionHandler]; } -- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeCurrentHueWithCompletion:completionHandler]; } - -+ (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeCurrentHueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeCurrentHueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeCurrentSaturationWithCompletion:completionHandler]; } - -+ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeCurrentSaturationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeCurrentSaturationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeRemainingTimeWithCompletion:completionHandler]; } - -+ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeRemainingTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRemainingTimeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeCurrentXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeCurrentXWithCompletion:completionHandler]; } - -+ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeCurrentXWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeCurrentXWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeCurrentYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeCurrentYWithCompletion:completionHandler]; } - -+ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeCurrentYWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeCurrentYWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeDriftCompensationWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDriftCompensationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDriftCompensationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeCompensationTextWithCompletion:completionHandler]; } - -- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void) + subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeCompensationTextWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeCompensationTextWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeColorTemperatureMiredsWithCompletion:completionHandler]; } - -- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeColorTemperatureMiredsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeColorTemperatureMiredsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeColorModeWithCompletion:completionHandler]; } - -- (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeColorModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeColorModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeOptionsWithCompletion:completionHandler]; } - -- (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeOptionsWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeOptionsWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeOptionsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributePowerDivisorWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeOptionsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeNumberOfPrimariesWithCompletion:completionHandler]; } - -+ (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeNumberOfPrimariesWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNumberOfPrimariesWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributePrimary1XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributePrimary1XWithCompletion:completionHandler]; } - -+ (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributePrimary1XWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributePrimary1XWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributePrimary1YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributePrimary1YWithCompletion:completionHandler]; +} +- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePrimary1YWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary1YWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary1IntensityWithCompletion:completionHandler]; } - -- (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributePrimary1IntensityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributePrimary1IntensityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary2XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary2XWithCompletion:completionHandler]; } - -- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributePrimary2XWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributePrimary2XWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary2YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary2YWithCompletion:completionHandler]; } - -- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributePrimary2YWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributePrimary2YWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary2IntensityWithCompletion:completionHandler]; } - -- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributePrimary2IntensityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributePrimary2IntensityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary3XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary3XWithCompletion:completionHandler]; } - -- (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributePrimary3XWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributePrimary3XWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary3YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary3YWithCompletion:completionHandler]; } - -- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributePrimary3YWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributePrimary3YWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary3IntensityWithCompletion:completionHandler]; } - -- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributePrimary3IntensityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributePrimary3IntensityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary4XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary4XWithCompletion:completionHandler]; } - -- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributePrimary4XWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributePrimary4XWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary4YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary4YWithCompletion:completionHandler]; } - -- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributePrimary4YWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributePrimary4YWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary4IntensityWithCompletion:completionHandler]; } - -- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributePrimary4IntensityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributePrimary4IntensityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributePrimary5XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary5XWithCompletion:completionHandler]; +} +- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePrimary5XWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary5XWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary5YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary5YWithCompletion:completionHandler]; +} +- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePrimary5YWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary5YWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributePrimary5IntensityWithCompletion:completionHandler]; +} +- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePrimary5IntensityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary5IntensityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributePrimary6XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributePrimary6XWithCompletion:completionHandler]; +} +- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePrimary6XWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary6XWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributePrimary6YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary6YWithCompletion:completionHandler]; +} +- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePrimary6YWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary6YWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePrimary6IntensityWithCompletion:completionHandler]; +} +- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePrimary6IntensityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePrimary6IntensityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeActivePowerWithCompletionHandler:(void (^)( +- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeWhitePointXWithCompletion:completionHandler]; } - -- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeWhitePointXWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeWhitePointXWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeWhitePointXWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeWhitePointXWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeWhitePointYWithCompletion:completionHandler]; } - -- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeWhitePointYWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeWhitePointYWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeWhitePointYWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWhitePointYWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeColorPointRXWithCompletion:completionHandler]; } - -+ (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeColorPointRXWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeReactivePowerWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeColorPointRXWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeColorPointRXWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeColorPointRXWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeApparentPowerWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeColorPointRYWithCompletion:completionHandler]; } - -- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeColorPointRYWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeColorPointRYWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributePowerFactorWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeColorPointRYWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeColorPointRYWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeColorPointRIntensityWithCompletion:completionHandler]; } - -- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeColorPointRIntensityWithValue:value params:nil completion:completionHandler]; } - -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeColorPointRIntensityWithValue:value params:params completion:completionHandler]; } -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeColorPointRIntensityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeColorPointRIntensityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeColorPointGXWithCompletion:completionHandler]; } - -- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeColorPointGXWithValue:value params:nil completion:completionHandler]; } - -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeColorPointGXWithValue:value params:params completion:completionHandler]; } -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeColorPointGXWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler ++ (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeColorPointGXWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeColorPointGYWithCompletion:completionHandler]; } - -- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeColorPointGYWithValue:value params:nil completion:completionHandler]; } - -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeColorPointGYWithValue:value params:params completion:completionHandler]; } -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + [self NewsubscribeAttributeColorPointGYWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorPointGYWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); +- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorPointGIntensityWithCompletion:completionHandler]; } - -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeColorPointGIntensityWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeColorPointGIntensityWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeColorPointGIntensityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorPointGIntensityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self readAttributeColorPointBXWithCompletion:completionHandler]; } -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeColorPointBXWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeColorPointBXWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeColorPointBXWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeColorPointBXWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeColorPointBYWithCompletion:completionHandler]; } -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeColorPointBYWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeColorPointBYWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeColorPointBYWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeColorPointBYWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeColorPointBIntensityWithCompletion:completionHandler]; } -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeColorPointBIntensityWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeColorPointBIntensityWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeColorPointBIntensityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeColorPointBIntensityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeEnhancedCurrentHueWithCompletion:completionHandler]; } - -+ (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeEnhancedCurrentHueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeEnhancedCurrentHueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeEnhancedColorModeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeEnhancedColorModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEnhancedColorModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorLoopActiveWithCompletion:completionHandler]; +} +- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeColorLoopActiveWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorLoopActiveWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeColorLoopDirectionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeColorLoopDirectionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorLoopDirectionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorLoopTimeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeColorLoopTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorLoopTimeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorLoopStartEnhancedHueWithCompletion:completionHandler]; +} +- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeColorLoopStartEnhancedHueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorLoopStartEnhancedHueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorLoopStoredEnhancedHueWithCompletion:completionHandler]; +} +- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorLoopStoredEnhancedHueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorCapabilitiesWithCompletion:completionHandler]; +} +- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeColorCapabilitiesWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorCapabilitiesWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorTempPhysicalMinMiredsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorTempPhysicalMinMiredsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorTempPhysicalMaxMiredsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpColorTemperatureMiredsWithCompletion:completionHandler]; +} +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpColorTemperatureMiredsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpColorTemperatureMiredsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpColorTemperatureMiredsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterBallastConfiguration + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -80905,45 +82205,44 @@ - (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnul minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -80953,69 +82252,67 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -81025,69 +82322,67 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -81097,69 +82392,104 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeMinLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -81169,26 +82499,25 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81197,7 +82526,7 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -81208,24 +82537,23 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -81238,11 +82566,11 @@ - (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -81251,19 +82579,18 @@ - (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -81279,141 +82606,114 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeIntrinsicBalanceFactorWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + value = [value copy]; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -81423,26 +82723,26 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81451,7 +82751,7 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -81462,69 +82762,75 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute( cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -81534,69 +82840,67 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -81606,69 +82910,105 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLampTypeWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } -+ (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -81678,70 +83018,106 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLampManufacturerWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} -+ (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -81751,70 +83127,111 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } -+ (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -81824,70 +83241,111 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } -+ (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -81897,143 +83355,105 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + value = [value copy]; - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} -- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -82043,70 +83463,114 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } -+ (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)NewsubscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -82116,286 +83580,288 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRBallastConfigurationAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRBallastConfigurationAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -82405,70 +83871,67 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -82478,241 +83941,716 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +@end + +@implementation MTRBaseClusterBallastConfiguration (Deprecated) + +- (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributePhysicalMinLevelWithCompletion:completionHandler]; } - -- (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributePhysicalMinLevelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePhysicalMinLevelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributePhysicalMaxLevelWithCompletion:completionHandler]; } - -- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributePhysicalMaxLevelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributePhysicalMaxLevelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBallastStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeBallastStatusWithCompletion:completionHandler]; } - -- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self NewsubscribeAttributeBallastStatusWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBallastStatusWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinLevelWithCompletion:completionHandler]; +} +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinLevelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinLevelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMinLevelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinLevelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxLevelWithCompletion:completionHandler]; +} +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMaxLevelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMaxLevelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxLevelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxLevelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeIntrinsicBalanceFactorWithCompletion:completionHandler]; +} +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeIntrinsicBalanceFactorWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeIntrinsicBalanceFactorWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeIntrinsicBalanceFactorWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeIntrinsicBalanceFactorWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeBallastFactorAdjustmentWithCompletion:completionHandler]; +} +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBallastFactorAdjustmentWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBallastFactorAdjustmentWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBallastFactorAdjustmentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBallastFactorAdjustmentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLampQuantityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLampQuantityWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLampQuantityWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLampQuantityWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLampTypeWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLampTypeWithCompletion:completionHandler]; +} +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampTypeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampTypeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLampTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLampTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLampManufacturerWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLampManufacturerWithCompletion:completionHandler]; +} +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampManufacturerWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampManufacturerWithValue:value params:params completion:completionHandler]; +} +- (void) + subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLampManufacturerWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLampManufacturerWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLampRatedHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLampRatedHoursWithCompletion:completionHandler]; +} +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampRatedHoursWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampRatedHoursWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLampRatedHoursWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLampRatedHoursWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLampBurnHoursWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLampBurnHoursWithCompletion:completionHandler]; +} +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampBurnHoursWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampBurnHoursWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLampBurnHoursWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLampBurnHoursWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLampAlarmModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLampAlarmModeWithCompletion:completionHandler]; +} +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampAlarmModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampAlarmModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLampAlarmModeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLampAlarmModeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLampBurnHoursTripPointWithCompletion:completionHandler]; +} +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampBurnHoursTripPointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLampBurnHoursTripPointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLampBurnHoursTripPointWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLampBurnHoursTripPointWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterIlluminanceMeasurement + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; } - return CHIP_ERROR_NOT_FOUND; - }); + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -82720,45 +84658,45 @@ - (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)m minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -82768,24 +84706,22 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -82793,45 +84729,45 @@ - (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnul minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -82841,24 +84777,22 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -82866,45 +84800,45 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnul minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -82914,69 +84848,66 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -82986,70 +84917,68 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -83059,143 +84988,289 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + __block MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -83205,26 +85280,24 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -83237,11 +85310,11 @@ - (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnul // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -83250,19 +85323,18 @@ - (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -83278,143 +85350,391 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} +@end -- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +@implementation MTRBaseClusterIlluminanceMeasurement (Deprecated) + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeMeasuredValueWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMinMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + [self readAttributeMaxMeasuredValueWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion:completionHandler]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeToleranceWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLightSensorTypeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLightSensorTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLightSensorTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterTemperatureMeasurement + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; } - return CHIP_ERROR_NOT_FOUND; - }); + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -83424,70 +85744,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -83497,70 +85815,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -83570,26 +85886,23 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -83602,11 +85915,11 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNu // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -83615,19 +85928,18 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNu params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -83643,288 +85955,289 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + __block MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -83934,70 +86247,67 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -84007,215 +86317,361 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterTemperatureMeasurement (Deprecated) + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeMeasuredValueWithCompletion:completionHandler]; } - -- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeMinMeasuredValueWithCompletion:completionHandler]; } - -- (void)subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeMinMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeMinMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeMaxMeasuredValueWithCompletion:completionHandler]; } - -- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self NewsubscribeAttributeMaxMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion:completionHandler]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeToleranceWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterPressureMeasurement + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -84225,24 +86681,22 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -84250,45 +86704,45 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnul minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -84298,69 +86752,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -84370,26 +86823,23 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -84402,11 +86852,11 @@ - (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnul // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -84415,19 +86865,18 @@ - (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnul params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -84443,70 +86892,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -84516,23 +86963,22 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)NewsubscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { @@ -84540,45 +86986,45 @@ - (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull) minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -84588,70 +87034,68 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -84661,70 +87105,67 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -84734,70 +87175,66 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -84807,289 +87244,288 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRPressureMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRPressureMeasurementAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -85099,26 +87535,24 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -85131,11 +87565,11 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NS // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -85144,19 +87578,18 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NS params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85172,70 +87605,504 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} +@end -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +@implementation MTRBaseClusterPressureMeasurement (Deprecated) + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, + [self readAttributeMeasuredValueWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMinMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion:completionHandler]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeToleranceWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScaledValueWithCompletion:completionHandler]; +} +- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeScaledValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScaledValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMinScaledValueWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMinScaledValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinScaledValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxScaledValueWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxScaledValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxScaledValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeScaledToleranceWithCompletion:completionHandler]; +} +- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeScaledToleranceWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScaledToleranceWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScaleWithCompletion:completionHandler]; +} +- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeScaleWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScaleWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterFlowMeasurement + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)NewsubscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -85245,70 +88112,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -85318,70 +88183,68 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -85391,26 +88254,23 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -85423,11 +88283,11 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -85436,19 +88296,18 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85464,73 +88323,72 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -85540,73 +88398,70 @@ new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + __block MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -85616,70 +88471,69 @@ new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRFlowMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + __block MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRFlowMeasurementAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -85689,24 +88543,24 @@ new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -85719,11 +88573,11 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -85732,18 +88586,18 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85759,25 +88613,24 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -85790,11 +88643,11 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], @@ -85803,19 +88656,18 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -85833,7 +88685,274 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su @end -@implementation MTRBaseClusterElectricalMeasurement (Deprecated) +@implementation MTRBaseClusterFlowMeasurement (Deprecated) + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMinMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion:completionHandler]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeToleranceWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { @@ -85842,7 +88961,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterTestCluster +@implementation MTRBaseClusterRelativeHumidityMeasurement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -85857,1341 +88976,36393 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)testWithCompletionHandler:(StatusCompletion)completionHandler +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self testWithParams:nil completionHandler:completionHandler]; + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler + +- (void)NewsubscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::Test::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)testNotHandledWithCompletionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self testNotHandledWithParams:nil completionHandler:completionHandler]; + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestNotHandled::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testSpecificWithCompletionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self testSpecificWithParams:nil completionHandler:completionHandler]; -} -- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params - completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestSpecific::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testUnknownCommandWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self testUnknownCommandWithParams:nil completionHandler:completionHandler]; -} -- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRCommandSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestUnknownCommand::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestAddArguments::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - request.arg1 = params.arg1.unsignedCharValue; - request.arg2 = params.arg2.unsignedCharValue; + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestSimpleArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - request.arg1 = params.arg1.boolValue; - - auto successFn = Callback::FromCancelable(success); + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params - completionHandler: - (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestStructArrayArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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:[MTRTestClusterClusterNestedStructList class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTestClusterClusterNestedStructList *) 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:[MTRTestClusterClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRTestClusterClusterSimpleStruct *) 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:[MTRTestClusterClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTestClusterClusterSimpleStruct *) 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(); - } + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - request.arg5 = static_cast>(params.arg5.unsignedCharValue); - request.arg6 = params.arg6.boolValue; + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestStructArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - 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; + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestNestedStructArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } - 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 CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestListStructArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - { - 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:[MTRTestClusterClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTestClusterClusterSimpleStruct *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterRelativeHumidityMeasurement (Deprecated) + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMinMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMaxMeasuredValueWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion:completionHandler]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeToleranceWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterOccupancySensing + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion +{ + [self writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion +{ + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value + params:nil + completion:completion]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion +{ + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completion:completion]; +} +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completion:completion]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value + params:nil + completion:completion]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void) + NewsubscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTROccupancySensingAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTROccupancySensingAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterOccupancySensing (Deprecated) + +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupancyWithCompletion:completionHandler]; +} +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOccupancyWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupancyWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupancySensorTypeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOccupancySensorTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupancySensorTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupancySensorTypeBitmapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOccupancySensorTypeBitmapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupancySensorTypeBitmapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePirOccupiedToUnoccupiedDelayWithCompletion:completionHandler]; +} +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePirOccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePirOccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePirUnoccupiedToOccupiedDelayWithCompletion:completionHandler]; +} +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePirUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePirUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePirUnoccupiedToOccupiedThresholdWithCompletion:completionHandler]; +} +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePirUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePirUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:completionHandler]; +} +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:completionHandler]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:completionHandler]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:completionHandler]; +} +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:completionHandler]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:completionHandler]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterWakeOnLan + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWakeOnLanAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRWakeOnLanAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterWakeOnLan (Deprecated) + +- (void)readAttributeMACAddressWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMACAddressWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMACAddressWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMACAddressWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterChannel + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params + completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRChannelClusterChangeChannelResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Channel::Commands::ChangeChannel::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.match = [self asCharSpan:params.match]; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Channel::Commands::ChangeChannelByNumber::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.majorNumber = params.majorNumber.unsignedShortValue; + request.minorNumber = params.minorNumber.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Channel::Commands::SkipChannel::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.count = params.count.unsignedShortValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRChannelChannelListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRChannelChannelListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRChannelChannelListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRChannelChannelListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRChannelChannelListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLineupWithCompletion:(void (^)( + MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completion +{ + new MTRChannelLineupStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRChannelLineupStructAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRChannelLineupStructAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRChannelLineupStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRChannelLineupStructAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRChannelCurrentChannelStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRChannelCurrentChannelStructAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRChannelGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRChannelGeneratedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRChannelAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRChannelAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRChannelAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRChannelAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRChannelAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRChannelAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRChannelAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterChannel (Deprecated) + +- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params + completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self changeChannelWithParams:params completion:completionHandler]; +} +- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self changeChannelByNumberWithParams:params completion:completionHandler]; +} +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self skipChannelWithParams:params completion:completionHandler]; +} + +- (void)readAttributeChannelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeChannelListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeChannelListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeChannelListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLineupWithCompletionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLineupWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLineupWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLineupWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentChannelWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentChannelWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentChannelWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterTargetNavigator + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params + completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TargetNavigator::Commands::NavigateTarget::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.target = params.target.unsignedCharValue; + if (params.data != nil) { + auto & definedValue_0 = request.data.Emplace(); + definedValue_0 = [self asCharSpan:params.data]; + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTargetNavigatorTargetListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTargetNavigatorTargetListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTargetNavigatorAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTargetNavigatorAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterTargetNavigator (Deprecated) + +- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params + completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self navigateTargetWithParams:params completion:completionHandler]; +} + +- (void)readAttributeTargetListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTargetListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTargetListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTargetListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentTargetWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentTargetWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentTargetWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterMediaPlayback + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)playWithCompletion:(void (^)( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self playWithParams:nil completion:completion]; +} +- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Play::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)pauseWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + [self pauseWithParams:nil completion:completion]; +} +- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Pause::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)stopPlaybackWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + [self stopPlaybackWithParams:nil completion:completion]; +} +- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::StopPlayback::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)startOverWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + [self startOverWithParams:nil completion:completion]; +} +- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::StartOver::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)previousWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + [self previousWithParams:nil completion:completion]; +} +- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Previous::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)nextWithCompletion:(void (^)( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self nextWithParams:nil completion:completion]; +} +- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Next::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)rewindWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + [self rewindWithParams:nil completion:completion]; +} +- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Rewind::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)fastForwardWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + [self fastForwardWithParams:nil completion:completion]; +} +- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::FastForward::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::SkipForward::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::SkipBackward::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Seek::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.position = params.position.unsignedLongLongValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRFloatAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRFloatAttributeCallbackSubscriptionBridge * callbackBridge = new MTRFloatAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFloatAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRFloatAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaPlaybackAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaPlaybackAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterMediaPlayback (Deprecated) + +- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self playWithParams:params completion:completionHandler]; +} +- (void)playWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self playWithParams:nil completion:completionHandler]; +} +- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self pauseWithParams:params completion:completionHandler]; +} +- (void)pauseWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self pauseWithParams:nil completion:completionHandler]; +} +- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self stopPlaybackWithParams:params completion:completionHandler]; +} +- (void)stopPlaybackWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self stopPlaybackWithParams:nil completion:completionHandler]; +} +- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self startOverWithParams:params completion:completionHandler]; +} +- (void)startOverWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self startOverWithParams:nil completion:completionHandler]; +} +- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self previousWithParams:params completion:completionHandler]; +} +- (void)previousWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self previousWithParams:nil completion:completionHandler]; +} +- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self nextWithParams:params completion:completionHandler]; +} +- (void)nextWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self nextWithParams:nil completion:completionHandler]; +} +- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self rewindWithParams:params completion:completionHandler]; +} +- (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self rewindWithParams:nil completion:completionHandler]; +} +- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self fastForwardWithParams:params completion:completionHandler]; +} +- (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self fastForwardWithParams:nil completion:completionHandler]; +} +- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self skipForwardWithParams:params completion:completionHandler]; +} +- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self skipBackwardWithParams:params completion:completionHandler]; +} +- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self seekWithParams:params completion:completionHandler]; +} + +- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentStateWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentStateWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentStateWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeStartTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartTimeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeStartTimeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartTimeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDurationWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDurationWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDurationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDurationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSampledPositionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSampledPositionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSampledPositionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePlaybackSpeedWithCompletion:completionHandler]; +} +- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePlaybackSpeedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePlaybackSpeedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSeekRangeEndWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSeekRangeEndWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSeekRangeEndWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSeekRangeStartWithCompletion:completionHandler]; +} +- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSeekRangeStartWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSeekRangeStartWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterMediaInput + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaInput::Commands::SelectInput::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.index = params.index.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)showInputStatusWithCompletion:(MTRStatusCompletion)completion +{ + [self showInputStatusWithParams:nil completion:completion]; +} +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaInput::Commands::ShowInputStatus::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)hideInputStatusWithCompletion:(MTRStatusCompletion)completion +{ + [self hideInputStatusWithParams:nil completion:completion]; +} +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaInput::Commands::HideInputStatus::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaInput::Commands::RenameInput::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.index = params.index.unsignedCharValue; + request.name = [self asCharSpan:params.name]; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaInputInputListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRMediaInputInputListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRMediaInputInputListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRMediaInputInputListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaInputInputListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaInputAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRMediaInputAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterMediaInput (Deprecated) + +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self selectInputWithParams:params completion:completionHandler]; +} +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self showInputStatusWithParams:params completion:completionHandler]; +} +- (void)showInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self showInputStatusWithParams:nil completion:completionHandler]; +} +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self hideInputStatusWithParams:params completion:completionHandler]; +} +- (void)hideInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self hideInputStatusWithParams:nil completion:completionHandler]; +} +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self renameInputWithParams:params completion:completionHandler]; +} + +- (void)readAttributeInputListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInputListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInputListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInputListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentInputWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentInputWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentInputWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterLowPower + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)sleepWithCompletion:(MTRStatusCompletion)completion +{ + [self sleepWithParams:nil completion:completion]; +} +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + LowPower::Commands::Sleep::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRLowPowerAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRLowPowerAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterLowPower (Deprecated) + +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self sleepWithParams:params completion:completionHandler]; +} +- (void)sleepWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self sleepWithParams:nil completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterKeypadInput + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params + completion: + (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRKeypadInputClusterSendKeyResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + KeypadInput::Commands::SendKey::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.keyCode = static_cast>(params.keyCode.unsignedCharValue); + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRKeypadInputAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRKeypadInputAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterKeypadInput (Deprecated) + +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params + completionHandler: + (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self sendKeyWithParams:params completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterContentLauncher + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params + completion:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ContentLauncher::Commands::LaunchContent::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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:[MTRContentLauncherClusterParameter class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRContentLauncherClusterParameter *) 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:[MTRContentLauncherClusterAdditionalInfo class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_4 = (MTRContentLauncherClusterAdditionalInfo *) 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]; + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params + completion: + (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ContentLauncher::Commands::LaunchURL::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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); + } + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRContentLauncherAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRContentLauncherAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterContentLauncher (Deprecated) + +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params + completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self launchContentWithParams:params completion:completionHandler]; +} +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params + completionHandler: + (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self launchURLWithParams:params completion:completionHandler]; +} + +- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptHeaderWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptHeaderWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptHeaderWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedStreamingProtocolsWithCompletion:completionHandler]; +} +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSupportedStreamingProtocolsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSupportedStreamingProtocolsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeSupportedStreamingProtocolsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedStreamingProtocolsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterAudioOutput + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + AudioOutput::Commands::SelectOutput::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.index = params.index.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + AudioOutput::Commands::RenameOutput::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.index = params.index.unsignedCharValue; + request.name = [self asCharSpan:params.name]; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAudioOutputOutputListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAudioOutputOutputListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAudioOutputAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAudioOutputAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterAudioOutput (Deprecated) + +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self selectOutputWithParams:params completion:completionHandler]; +} +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self renameOutputWithParams:params completion:completionHandler]; +} + +- (void)readAttributeOutputListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOutputListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOutputListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOutputListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentOutputWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentOutputWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentOutputWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterApplicationLauncher + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ApplicationLauncher::Commands::LaunchApp::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; + request.application.applicationId = [self asCharSpan:params.application.applicationId]; + if (params.data != nil) { + auto & definedValue_0 = request.data.Emplace(); + definedValue_0 = [self asByteSpan:params.data]; + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ApplicationLauncher::Commands::StopApp::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; + request.application.applicationId = [self asCharSpan:params.application.applicationId]; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ApplicationLauncher::Commands::HideApp::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; + request.application.applicationId = [self asCharSpan:params.application.applicationId]; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationLauncherCatalogListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationLauncherCatalogListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value + completion:(MTRStatusCompletion)completion +{ + [self writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable) value + params:nil + completion:completion]; +} +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.application.catalogVendorId = value.application.catalogVendorId.unsignedShortValue; + nonNullValue_0.application.applicationId = [self asCharSpan:value.application.applicationId]; + if (value.endpoint != nil) { + auto & definedValue_2 = nonNullValue_0.endpoint.Emplace(); + definedValue_2 = value.endpoint.unsignedShortValue; + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationLauncherAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationLauncherAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterApplicationLauncher (Deprecated) + +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self launchAppWithParams:params completion:completionHandler]; +} +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self stopAppWithParams:params completion:completionHandler]; +} +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self hideAppWithParams:params completion:completionHandler]; +} + +- (void)readAttributeCatalogListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCatalogListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCatalogListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCatalogListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentAppWithCompletion:completionHandler]; +} +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeCurrentAppWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeCurrentAppWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentAppWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentAppWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterApplicationBasic + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRVendorIdAttributeCallbackSubscriptionBridge * callbackBridge = new MTRVendorIdAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRVendorIdAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRApplicationBasicApplicationStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRApplicationBasicApplicationStructAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationBasicAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRApplicationBasicAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterApplicationBasic (Deprecated) + +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorNameWithCompletion:completionHandler]; +} +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeVendorNameWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorNameWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorIDWithCompletion:completionHandler]; +} +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeVendorIDWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorIDWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeApplicationNameWithCompletion:completionHandler]; +} +- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeApplicationNameWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApplicationNameWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeProductIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductIDWithCompletion:completionHandler]; +} +- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeProductIDWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductIDWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeApplicationWithCompletionHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApplicationWithCompletion:completionHandler]; +} +- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeApplicationWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeApplicationWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStatusWithCompletion:completionHandler]; +} +- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeStatusWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStatusWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeApplicationVersionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeApplicationVersionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApplicationVersionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAllowedVendorListWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAllowedVendorListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAllowedVendorListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterAccountLogin + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params + completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + AccountLogin::Commands::GetSetupPIN::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + AccountLogin::Commands::Login::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; + request.setupPIN = [self asCharSpan:params.setupPIN]; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)logoutWithCompletion:(MTRStatusCompletion)completion +{ + [self logoutWithParams:nil completion:completion]; +} +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + AccountLogin::Commands::Logout::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAccountLoginAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRAccountLoginAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterAccountLogin (Deprecated) + +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params + completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getSetupPINWithParams:params completion:completionHandler]; +} +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self loginWithParams:params completion:completionHandler]; +} +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self logoutWithParams:params completion:completionHandler]; +} +- (void)logoutWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self logoutWithParams:nil completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterElectricalMeasurement + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)getProfileInfoCommandWithCompletion:(MTRStatusCompletion)completion +{ + [self getProfileInfoCommandWithParams:nil completion:completion]; +} +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ElectricalMeasurement::Commands::GetProfileInfoCommand::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.attributeId = params.attributeId.unsignedShortValue; + request.startTime = params.startTime.unsignedIntValue; + request.numberOfIntervals = params.numberOfIntervals.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterElectricalMeasurement (Deprecated) + +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self getProfileInfoCommandWithParams:params completion:completionHandler]; +} +- (void)getProfileInfoCommandWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self getProfileInfoCommandWithParams:nil completion:completionHandler]; +} +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self getMeasurementProfileCommandWithParams:params completion:completionHandler]; +} + +- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasurementTypeWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasurementTypeWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasurementTypeWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcVoltageWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcVoltageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMinWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcVoltageMinWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMinWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMaxWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcVoltageMaxWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMaxWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMinWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcCurrentMinWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMinWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMaxWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcCurrentMaxWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMaxWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcPowerWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMinWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcPowerMinWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMinWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMaxWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcPowerMaxWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMaxWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMultiplierWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcVoltageMultiplierWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMultiplierWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageDivisorWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcVoltageDivisorWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageDivisorWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMultiplierWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcCurrentMultiplierWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMultiplierWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentDivisorWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcCurrentDivisorWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentDivisorWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMultiplierWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcPowerMultiplierWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMultiplierWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerDivisorWithCompletion:completionHandler]; +} +- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeDcPowerDivisorWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerDivisorWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcFrequencyWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMinWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcFrequencyMinWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMinWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMaxWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcFrequencyMaxWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMaxWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNeutralCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNeutralCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNeutralCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalActivePowerWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTotalActivePowerWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalActivePowerWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalReactivePowerWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTotalReactivePowerWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalReactivePowerWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalApparentPowerWithCompletion:completionHandler]; +} +- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeTotalApparentPowerWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalApparentPowerWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured1stHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured1stHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured3rdHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured5thHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured5thHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured7thHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured7thHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured9thHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured9thHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured11thHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured11thHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMultiplierWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcFrequencyMultiplierWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMultiplierWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyDivisorWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcFrequencyDivisorWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyDivisorWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePowerMultiplierWithCompletion:completionHandler]; +} +- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePowerMultiplierWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerMultiplierWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePowerDivisorWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerDivisorWithCompletion:completionHandler]; +} +- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePowerDivisorWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerDivisorWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeHarmonicCurrentMultiplierWithCompletion:completionHandler]; +} +- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeHarmonicCurrentMultiplierWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeHarmonicCurrentMultiplierWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePhaseHarmonicCurrentMultiplierWithCompletion:completionHandler]; +} +- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousVoltageWithCompletion:completionHandler]; +} +- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInstantaneousVoltageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousVoltageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousLineCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInstantaneousLineCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousLineCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousActiveCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInstantaneousActiveCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousActiveCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousReactiveCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInstantaneousReactiveCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousReactiveCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousPowerWithCompletion:completionHandler]; +} +- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInstantaneousPowerWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousPowerWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageMinWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageMaxWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsCurrentWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsCurrentMinWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsCurrentMaxWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActivePowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActivePowerWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActivePowerMinWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActivePowerMaxWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeReactivePowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerWithCompletion:completionHandler]; +} +- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeReactivePowerWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeApparentPowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerWithCompletion:completionHandler]; +} +- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeApparentPowerWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePowerFactorWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorWithCompletion:completionHandler]; +} +- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePowerFactorWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:completionHandler]; +} +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterWithCompletion:completionHandler]; +} +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAverageRmsUnderVoltageCounterWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAverageRmsUnderVoltageCounterWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodWithCompletion:completionHandler]; +} +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:completionHandler]; +} +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodWithCompletion:completionHandler]; +} +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsVoltageSagPeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsVoltageSagPeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageSagPeriodWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodWithCompletion:completionHandler]; +} +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsVoltageSwellPeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsVoltageSwellPeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageSwellPeriodWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageMultiplierWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcVoltageMultiplierWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageMultiplierWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageDivisorWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcVoltageDivisorWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageDivisorWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentMultiplierWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcCurrentMultiplierWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentMultiplierWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentDivisorWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcCurrentDivisorWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentDivisorWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcPowerMultiplierWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcPowerMultiplierWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcPowerMultiplierWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcPowerDivisorWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcPowerDivisorWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcPowerDivisorWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeOverloadAlarmsMaskWithCompletion:completionHandler]; +} +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOverloadAlarmsMaskWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOverloadAlarmsMaskWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOverloadAlarmsMaskWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOverloadAlarmsMaskWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeVoltageOverloadWithCompletion:completionHandler]; +} +- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeVoltageOverloadWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVoltageOverloadWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentOverloadWithCompletion:completionHandler]; +} +- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCurrentOverloadWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentOverloadWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcOverloadAlarmsMaskWithCompletion:completionHandler]; +} +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAcOverloadAlarmsMaskWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAcOverloadAlarmsMaskWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcOverloadAlarmsMaskWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcOverloadAlarmsMaskWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageOverloadWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcVoltageOverloadWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageOverloadWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentOverloadWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcCurrentOverloadWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentOverloadWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcActivePowerOverloadWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcActivePowerOverloadWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcActivePowerOverloadWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcReactivePowerOverloadWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcReactivePowerOverloadWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcReactivePowerOverloadWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAverageRmsOverVoltageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAverageRmsUnderVoltageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltageWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsExtremeOverVoltageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltageWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsExtremeUnderVoltageWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltageWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageSagWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageSwellWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLineCurrentPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLineCurrentPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLineCurrentPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveCurrentPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveCurrentPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveCurrentPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeReactiveCurrentPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeReactiveCurrentPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactiveCurrentPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltagePhaseBWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltagePhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltagePhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageMinPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentPhaseBWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsCurrentPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsCurrentMinPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActivePowerPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActivePowerMinPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActivePowerMaxPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeReactivePowerPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeApparentPowerPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePowerFactorPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLineCurrentPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLineCurrentPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLineCurrentPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveCurrentPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActiveCurrentPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveCurrentPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeReactiveCurrentPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeReactiveCurrentPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactiveCurrentPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltagePhaseCWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltagePhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltagePhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageMinPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentPhaseCWithCompletion:completionHandler]; +} +- (void) + subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsCurrentPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsCurrentMinPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActivePowerPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActivePowerMinPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeActivePowerMaxPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeReactivePowerPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeApparentPowerPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributePowerFactorPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:completionHandler]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:completionHandler]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:completionHandler]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterTestCluster + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)testWithCompletion:(MTRStatusCompletion)completion +{ + [self testWithParams:nil completion:completion]; +} +- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::Test::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testNotHandledWithCompletion:(MTRStatusCompletion)completion +{ + [self testNotHandledWithParams:nil completion:completion]; +} +- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestNotHandled::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testSpecificWithCompletion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + [self testSpecificWithParams:nil completion:completion]; +} +- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params + completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestSpecific::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testUnknownCommandWithCompletion:(MTRStatusCompletion)completion +{ + [self testUnknownCommandWithParams:nil completion:completion]; +} +- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestUnknownCommand::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params + completion:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestAddArguments::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1 = params.arg1.unsignedCharValue; + request.arg2 = params.arg2.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params + completion:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestSimpleArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1 = params.arg1.boolValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params + completion: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestStructArrayArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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:[MTRTestClusterClusterNestedStructList class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRTestClusterClusterNestedStructList *) 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:[MTRTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_2 = (MTRTestClusterClusterSimpleStruct *) 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:[MTRTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRTestClusterClusterSimpleStruct *) 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; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestStructArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestNestedStructArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestListStructArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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:[MTRTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRTestClusterClusterSimpleStruct *) 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(); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestListInt8UArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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(); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestNestedStructListArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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:[MTRTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRTestClusterClusterSimpleStruct *) 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(); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testListNestedStructListArgumentRequestWithParams: + (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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:[MTRTestClusterClusterNestedStructList class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRTestClusterClusterNestedStructList *) 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; + 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:[MTRTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_2 = (MTRTestClusterClusterSimpleStruct *) 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(); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params + completion:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestListInt8UReverseRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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(); + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params + completion:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestEnumsRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1 = static_cast>(params.arg1.unsignedShortValue); + request.arg2 = static_cast>(params.arg2.unsignedCharValue); + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params + completion:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestNullableOptionalRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + } + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params + completion: + (void (^)( + MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestComplexNullableOptionalRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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(); + } + } + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params + completion:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::SimpleStructEchoRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)timedInvokeRequestWithCompletion:(MTRStatusCompletion)completion +{ + [self timedInvokeRequestWithParams:nil completion:completion]; +} +- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TimedInvokeRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRCommandSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (params != nil) { + if (params.arg1 != nil) { + auto & definedValue_0 = request.arg1.Emplace(); + definedValue_0 = params.arg1.boolValue; + } + } + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params + completion:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestEmitTestEventRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1 = params.arg1.unsignedCharValue; + request.arg2 = static_cast>(params.arg2.unsignedCharValue); + request.arg3 = params.arg3.boolValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void) + testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + completion: + (void (^)( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestEmitTestFabricScopedEventRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1 = params.arg1.unsignedCharValue; + + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBooleanWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterBitmap8AttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBitmap8WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterBitmap8AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterBitmap16AttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBitmap16WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterBitmap16AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterBitmap32AttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBitmap32WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedIntValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterBitmap32AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterBitmap64AttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBitmap64WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedLongLongValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterBitmap64AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt8uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt16uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt24uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt32uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt40uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt48uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt56uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt64uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt8sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt16sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt24sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.intValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt32sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.intValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt40sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt64sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt48sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt64sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt56sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt64sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInt64sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt64sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEnum8WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEnum16WithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRFloatAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.floatValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRFloatAttributeCallbackSubscriptionBridge * callbackBridge = new MTRFloatAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRFloatAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRFloatAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRDoubleAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.doubleValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRDoubleAttributeCallbackSubscriptionBridge * callbackBridge = new MTRDoubleAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRDoubleAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRDoubleAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + new MTROctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOctetStringWithValue:(NSData * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asByteSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTROctetStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROctetStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + new MTROctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterListInt8uListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeListInt8uWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterListInt8uListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterListOctetStringListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeListOctetStringWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSData class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSData *) value[i_0]; + listHolder_0->mList[i_0] = [self asByteSpan:element_0]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterListOctetStringListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterListStructOctetStringListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRTestClusterClusterTestListStructOctet class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRTestClusterClusterTestListStructOctet *) value[i_0]; + listHolder_0->mList[i_0].member1 = element_0.member1.unsignedLongLongValue; + listHolder_0->mList[i_0].member2 = [self asByteSpan:element_0.member2]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterListStructOctetStringListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLongOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + new MTROctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLongOctetStringWithValue:(NSData * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asByteSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTROctetStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTROctetStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTROctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + new MTROctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeCharStringWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLongCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLongCharStringWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + new MTRCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEpochUsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEpochUsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEpochSWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEpochSWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeVendorIdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRVendorIdAttributeCallbackSubscriptionBridge * callbackBridge = new MTRVendorIdAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRVendorIdAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRVendorIdAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRTestClusterClusterNullablesAndOptionalsStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRTestClusterClusterNullablesAndOptionalsStruct *) value[i_0]; + if (element_0.nullableInt == nil) { + listHolder_0->mList[i_0].nullableInt.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableInt.SetNonNull(); + nonNullValue_2 = element_0.nullableInt.unsignedShortValue; + } + if (element_0.optionalInt != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalInt.Emplace(); + definedValue_2 = element_0.optionalInt.unsignedShortValue; + } + if (element_0.nullableOptionalInt != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalInt.Emplace(); + if (element_0.nullableOptionalInt == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = element_0.nullableOptionalInt.unsignedShortValue; + } + } + if (element_0.nullableString == nil) { + listHolder_0->mList[i_0].nullableString.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableString.SetNonNull(); + nonNullValue_2 = [self asCharSpan:element_0.nullableString]; + } + if (element_0.optionalString != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalString.Emplace(); + definedValue_2 = [self asCharSpan:element_0.optionalString]; + } + if (element_0.nullableOptionalString != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalString.Emplace(); + if (element_0.nullableOptionalString == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = [self asCharSpan:element_0.nullableOptionalString]; + } + } + if (element_0.nullableStruct == nil) { + listHolder_0->mList[i_0].nullableStruct.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableStruct.SetNonNull(); + nonNullValue_2.a = element_0.nullableStruct.a.unsignedCharValue; + nonNullValue_2.b = element_0.nullableStruct.b.boolValue; + nonNullValue_2.c = static_cast>( + element_0.nullableStruct.c.unsignedCharValue); + nonNullValue_2.d = [self asByteSpan:element_0.nullableStruct.d]; + nonNullValue_2.e = [self asCharSpan:element_0.nullableStruct.e]; + nonNullValue_2.f = static_cast>( + element_0.nullableStruct.f.unsignedCharValue); + nonNullValue_2.g = element_0.nullableStruct.g.floatValue; + nonNullValue_2.h = element_0.nullableStruct.h.doubleValue; + } + if (element_0.optionalStruct != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalStruct.Emplace(); + definedValue_2.a = element_0.optionalStruct.a.unsignedCharValue; + definedValue_2.b = element_0.optionalStruct.b.boolValue; + definedValue_2.c = static_cast>( + element_0.optionalStruct.c.unsignedCharValue); + definedValue_2.d = [self asByteSpan:element_0.optionalStruct.d]; + definedValue_2.e = [self asCharSpan:element_0.optionalStruct.e]; + definedValue_2.f = static_cast>( + element_0.optionalStruct.f.unsignedCharValue); + definedValue_2.g = element_0.optionalStruct.g.floatValue; + definedValue_2.h = element_0.optionalStruct.h.doubleValue; + } + if (element_0.nullableOptionalStruct != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalStruct.Emplace(); + if (element_0.nullableOptionalStruct == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3.a = element_0.nullableOptionalStruct.a.unsignedCharValue; + nonNullValue_3.b = element_0.nullableOptionalStruct.b.boolValue; + nonNullValue_3.c = static_cast>( + element_0.nullableOptionalStruct.c.unsignedCharValue); + nonNullValue_3.d = [self asByteSpan:element_0.nullableOptionalStruct.d]; + nonNullValue_3.e = [self asCharSpan:element_0.nullableOptionalStruct.e]; + nonNullValue_3.f = static_cast>( + element_0.nullableOptionalStruct.f.unsignedCharValue); + nonNullValue_3.g = element_0.nullableOptionalStruct.g.floatValue; + nonNullValue_3.h = element_0.nullableOptionalStruct.h.doubleValue; + } + } + if (element_0.nullableList == nil) { + listHolder_0->mList[i_0].nullableList.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableList.SetNonNull(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (element_0.nullableList.count != 0) { + auto * listHolder_3 = new ListHolder(element_0.nullableList.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < element_0.nullableList.count; ++i_3) { + if (![element_0.nullableList[i_3] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_3 = (NSNumber *) element_0.nullableList[i_3]; + listHolder_3->mList[i_3] + = static_castmList[i_3])>>( + element_3.unsignedCharValue); + } + nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.nullableList.count); + } else { + nonNullValue_2 = ListType_3(); + } + } + } + if (element_0.optionalList != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalList.Emplace(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (element_0.optionalList.count != 0) { + auto * listHolder_3 = new ListHolder(element_0.optionalList.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < element_0.optionalList.count; ++i_3) { + if (![element_0.optionalList[i_3] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_3 = (NSNumber *) element_0.optionalList[i_3]; + listHolder_3->mList[i_3] + = static_castmList[i_3])>>( + element_3.unsignedCharValue); + } + definedValue_2 = ListType_3(listHolder_3->mList, element_0.optionalList.count); + } else { + definedValue_2 = ListType_3(); + } + } + } + if (element_0.nullableOptionalList != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalList.Emplace(); + if (element_0.nullableOptionalList == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + { + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; + if (element_0.nullableOptionalList.count != 0) { + auto * listHolder_4 + = new ListHolder(element_0.nullableOptionalList.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_0.nullableOptionalList.count; ++i_4) { + if (![element_0.nullableOptionalList[i_4] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_4 = (NSNumber *) element_0.nullableOptionalList[i_4]; + listHolder_4->mList[i_4] + = static_castmList[i_4])>>( + element_4.unsignedCharValue); + } + nonNullValue_3 = ListType_4(listHolder_4->mList, element_0.nullableOptionalList.count); + } else { + nonNullValue_3 = ListType_4(); + } + } + } + } + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge * innerCallbackBridge + = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeStructAttrWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRTestClusterStructAttrStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value + completion:(MTRStatusCompletion)completion +{ + [self writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + TypeInfo::Type cppValue; + cppValue.a = value.a.unsignedCharValue; + cppValue.b = value.b.boolValue; + cppValue.c = static_cast>(value.c.unsignedCharValue); + cppValue.d = [self asByteSpan:value.d]; + cppValue.e = [self asCharSpan:value.e]; + cppValue.f = static_cast>(value.f.unsignedCharValue); + cppValue.g = value.g.floatValue; + cppValue.h = value.h.doubleValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completion +{ + new MTRTestClusterStructAttrStructAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterListLongOctetStringListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSData class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSData *) value[i_0]; + listHolder_0->mList[i_0] = [self asByteSpan:element_0]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeListLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterListLongOctetStringListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ // Make a copy of params before we go async. + params = [params copy]; + new MTRTestClusterListFabricScopedListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + }); +} + +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRTestClusterClusterTestFabricScoped class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRTestClusterClusterTestFabricScoped *) value[i_0]; + listHolder_0->mList[i_0].fabricSensitiveInt8u = element_0.fabricSensitiveInt8u.unsignedCharValue; + if (element_0.optionalFabricSensitiveInt8u != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalFabricSensitiveInt8u.Emplace(); + definedValue_2 = element_0.optionalFabricSensitiveInt8u.unsignedCharValue; + } + if (element_0.nullableFabricSensitiveInt8u == nil) { + listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNonNull(); + nonNullValue_2 = element_0.nullableFabricSensitiveInt8u.unsignedCharValue; + } + if (element_0.nullableOptionalFabricSensitiveInt8u != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalFabricSensitiveInt8u.Emplace(); + if (element_0.nullableOptionalFabricSensitiveInt8u == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = element_0.nullableOptionalFabricSensitiveInt8u.unsignedCharValue; + } + } + listHolder_0->mList[i_0].fabricSensitiveCharString = [self asCharSpan:element_0.fabricSensitiveCharString]; + listHolder_0->mList[i_0].fabricSensitiveStruct.a = element_0.fabricSensitiveStruct.a.unsignedCharValue; + listHolder_0->mList[i_0].fabricSensitiveStruct.b = element_0.fabricSensitiveStruct.b.boolValue; + listHolder_0->mList[i_0].fabricSensitiveStruct.c + = static_castmList[i_0].fabricSensitiveStruct.c)>>( + element_0.fabricSensitiveStruct.c.unsignedCharValue); + listHolder_0->mList[i_0].fabricSensitiveStruct.d = [self asByteSpan:element_0.fabricSensitiveStruct.d]; + listHolder_0->mList[i_0].fabricSensitiveStruct.e = [self asCharSpan:element_0.fabricSensitiveStruct.e]; + listHolder_0->mList[i_0].fabricSensitiveStruct.f + = static_castmList[i_0].fabricSensitiveStruct.f)>>( + element_0.fabricSensitiveStruct.f.unsignedCharValue); + listHolder_0->mList[i_0].fabricSensitiveStruct.g = element_0.fabricSensitiveStruct.g.floatValue; + listHolder_0->mList[i_0].fabricSensitiveStruct.h = element_0.fabricSensitiveStruct.h.doubleValue; + { + using ListType_2 = std::remove_reference_tmList[i_0].fabricSensitiveInt8uList)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.fabricSensitiveInt8uList.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.fabricSensitiveInt8uList.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.fabricSensitiveInt8uList.count; ++i_2) { + if (![element_0.fabricSensitiveInt8uList[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_2 = (NSNumber *) element_0.fabricSensitiveInt8uList[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedCharValue; + } + listHolder_0->mList[i_0].fabricSensitiveInt8uList + = ListType_2(listHolder_2->mList, element_0.fabricSensitiveInt8uList.count); + } else { + listHolder_0->mList[i_0].fabricSensitiveInt8uList = ListType_2(); + } + } + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - request.arg1 = ListType_0(); + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeListFabricScopedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterListFabricScopedListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeTimedWriteBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeTimedWriteBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneralErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneralErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeClusterErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeUnsupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeUnsupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.boolValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableBooleanAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableBooleanAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterNullableBitmap8AttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterNullableBitmap8AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterNullableBitmap16AttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedShortValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterNullableBitmap16AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterNullableBitmap32AttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedIntValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterNullableBitmap32AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterNullableBitmap64AttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedLongLongValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterNullableBitmap64AttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeNullableInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestListInt8UArgumentRequest::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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(); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestNestedStructListArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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:[MTRTestClusterClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (MTRTestClusterClusterSimpleStruct *) 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(); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeNullableInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testListNestedStructListArgumentRequestWithParams: - (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.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:[MTRTestClusterClusterNestedStructList class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTestClusterClusterNestedStructList *) 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:[MTRTestClusterClusterSimpleStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRTestClusterClusterSimpleStruct *) 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(); + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeNullableInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestListInt8UReverseRequest::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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(); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestEnumsRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - request.arg1 = static_cast>(params.arg1.unsignedShortValue); - request.arg2 = static_cast>(params.arg2.unsignedCharValue); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeNullableInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params - completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestNullableOptionalRequest::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.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; - } + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeNullableInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params - completionHandler: - (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestComplexNullableOptionalRequest::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.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.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - if (params.nullableList == nil) { - request.nullableList.SetNull(); + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.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(); - } - } + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; } - 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(); - } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - 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 err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNullableInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::SimpleStructEchoRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - 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 err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeNullableInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)timedInvokeRequestWithCompletionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self timedInvokeRequestWithParams:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TimedInvokeRequest::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); + + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - auto successFn = Callback::FromCancelable(success); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); +} + +- (void)NewsubscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRCommandSuccessCallbackBridge( + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.arg1 != nil) { - auto & definedValue_0 = request.arg1.Emplace(); - definedValue_0 = params.arg1.boolValue; + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestEmitTestEventRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt64uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - request.arg1 = params.arg1.unsignedCharValue; - request.arg2 = static_cast>(params.arg2.unsignedCharValue); - request.arg3 = params.arg3.boolValue; + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeNullableInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params - completionHandler: - (void (^)( - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; - new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, self.device, completionHandler, + value = [value copy]; + + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, self.device, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestEmitTestFabricScopedEventRequest::Type request; + chip::Optional timedWriteTimeout; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); } } - request.arg1 = params.arg1.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.charValue; + } + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); }); } -- (void)readAttributeBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)NewsubscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; + params = [params copy]; + __block MTRNullableInt8sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRNullableInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNullableInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -87200,7 +125371,7 @@ - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -87211,9 +125382,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.boolValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -87223,54 +125399,56 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -87280,25 +125458,25 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTestClusterBitmap8AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBitmap8WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -87307,7 +125485,7 @@ - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -87318,9 +125496,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.intValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -87330,55 +125513,56 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge( + __block MTRNullableInt32sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRNullableInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTestClusterBitmap8AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -87388,26 +125572,25 @@ new MTRTestClusterBitmap8AttributeCallbackBridge(queue, completionHandler, ^(Can }); } -- (void)readAttributeBitmap16WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTestClusterBitmap16AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBitmap16WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -87416,7 +125599,7 @@ - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -87427,9 +125610,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.intValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -87439,55 +125627,56 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge( + __block MTRNullableInt32sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRNullableInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTestClusterBitmap16AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt32sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -87497,26 +125686,25 @@ new MTRTestClusterBitmap16AttributeCallbackBridge(queue, completionHandler, ^(Ca }); } -- (void)readAttributeBitmap32WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTestClusterBitmap32AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBitmap32WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -87525,7 +125713,7 @@ - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -87536,9 +125724,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedIntValue); + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -87548,55 +125741,56 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge( + __block MTRNullableInt64sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRNullableInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTestClusterBitmap32AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -87606,26 +125800,25 @@ new MTRTestClusterBitmap32AttributeCallbackBridge(queue, completionHandler, ^(Ca }); } -- (void)readAttributeBitmap64WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTestClusterBitmap64AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBitmap64WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -87634,7 +125827,7 @@ - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -87645,9 +125838,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedLongLongValue); + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -87657,55 +125855,56 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge( + __block MTRNullableInt64sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRNullableInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRTestClusterBitmap64AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -87715,25 +125914,25 @@ new MTRTestClusterBitmap64AttributeCallbackBridge(queue, completionHandler, ^(Ca }); } -- (void)readAttributeInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -87742,7 +125941,7 @@ - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -87753,9 +125952,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -87765,54 +125969,56 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt64sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -87822,25 +126028,25 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt16uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -87849,7 +126055,7 @@ - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -87860,9 +126066,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -87872,54 +126083,56 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt64sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt64sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -87929,25 +126142,25 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt24uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -87956,7 +126169,7 @@ - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -87967,9 +126180,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -87979,54 +126197,56 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -88036,25 +126256,25 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt32uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -88063,7 +126283,7 @@ - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -88074,9 +126294,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -88086,54 +126311,56 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -88143,25 +126370,25 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableFloatAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt40uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -88170,7 +126397,7 @@ - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -88181,9 +126408,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.floatValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -88193,54 +126425,57 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + __block MTRNullableFloatAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableFloatAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableFloatAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableFloatAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -88250,25 +126485,25 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableDoubleAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt48uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -88277,7 +126512,7 @@ - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -88288,9 +126523,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.doubleValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -88300,54 +126540,57 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableDoubleAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableDoubleAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableDoubleAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableDoubleAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -88357,25 +126600,25 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt56uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableOctetStringWithValue:(NSData * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -88384,7 +126627,7 @@ - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -88395,9 +126638,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = [self asByteSpan:value]; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -88407,54 +126655,56 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableOctetStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableOctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableOctetStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -88464,25 +126714,25 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt64uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableCharStringWithValue:(NSString * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -88491,7 +126741,7 @@ - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -88502,9 +126752,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = [self asCharSpan:value]; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -88514,54 +126769,57 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableCharStringAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableCharStringAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -88571,25 +126829,25 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt8sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -88598,7 +126856,7 @@ - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -88609,9 +126867,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.charValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -88621,82 +126884,89 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableStructWithCompletion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRTestClusterNullableStructStructAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value + completion:(MTRStatusCompletion)completion { - [self writeAttributeInt16sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable) value + params:nil + completion:completion]; } -- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -88705,7 +126975,7 @@ - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -88716,9 +126986,21 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.a = value.a.unsignedCharValue; + nonNullValue_0.b = value.b.boolValue; + nonNullValue_0.c = static_cast>(value.c.unsignedCharValue); + nonNullValue_0.d = [self asByteSpan:value.d]; + nonNullValue_0.e = [self asCharSpan:value.e]; + nonNullValue_0.f = static_cast>(value.f.unsignedCharValue); + nonNullValue_0.g = value.g.floatValue; + nonNullValue_0.h = value.h.doubleValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -88728,54 +127010,57 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRTestClusterNullableStructStructAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -88785,25 +127070,26 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt24sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -88812,7 +127098,7 @@ - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -88823,9 +127109,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.intValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -88835,54 +127126,58 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} + __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); -+ (void)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -88892,25 +127187,26 @@ new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt32sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -88919,7 +127215,7 @@ - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -88930,9 +127226,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.intValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.charValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -88942,54 +127243,58 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt32sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt8sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt8sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -88999,25 +127304,26 @@ new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt40sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -89026,7 +127332,7 @@ - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -89037,9 +127343,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.longLongValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -89049,54 +127360,58 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -89106,25 +127421,26 @@ new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt48sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -89133,7 +127449,7 @@ - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -89144,9 +127460,14 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.longLongValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -89156,54 +127477,58 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion { - new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRNullableInt16sAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -89213,25 +127538,25 @@ new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWriteOnlyInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeInt56sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -89240,7 +127565,7 @@ - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, self.device, ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); + completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedWriteTimeout; @@ -89251,9 +127576,9 @@ new MTRDefaultSuccessCallbackBridge( } ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.longLongValue; + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -89263,54 +127588,55 @@ new MTRDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeWriteOnlyInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64sAttributeCallbackSubscriptionBridge( + __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWriteOnlyInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt8uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -89320,211 +127646,285 @@ new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeInt64sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; + __block MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.longLongValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt64sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + __block MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); } -+ (void)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge( + queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRTestClusterAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeEnum8WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)NewsubscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. + minInterval = [minInterval copy]; + maxInterval = [maxInterval copy]; params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + __block MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge + = new MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, self.device, reportHandler, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + + chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); + MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], + chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); + }, + subscriptionEstablished); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + new MTRTestClusterAttributeListListAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; maxInterval = [maxInterval copy]; params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( + __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, self.device, reportHandler, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; + MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt32uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -89534,11 +127934,11 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc }); } -- (void)readAttributeEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, + new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); @@ -89546,49 +127946,12 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completion }); } -- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeEnum16WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)NewsubscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { // Make a copy of params before we go async. minInterval = [minInterval copy]; @@ -89601,7 +127964,7 @@ - (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -89614,18 +127977,18 @@ - (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); }, - subscriptionEstablishedHandler); + subscriptionEstablished); } -+ (void)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new MTRInt16uAttributeCallbackBridge(queue, completion, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -89641,7480 +128004,3487 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeFloatSingleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterTestCluster (Deprecated) + +- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - new MTRFloatAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self testWithParams:params completion:completionHandler]; +} +- (void)testWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self testWithParams:nil completion:completionHandler]; +} +- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testNotHandledWithParams:params completion:completionHandler]; +} +- (void)testNotHandledWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self testNotHandledWithParams:nil completion:completionHandler]; +} +- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testSpecificWithParams:params completion:completionHandler]; +} +- (void)testSpecificWithCompletionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testSpecificWithParams:nil completion:completionHandler]; +} +- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testUnknownCommandWithParams:params completion:completionHandler]; +} +- (void)testUnknownCommandWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self testUnknownCommandWithParams:nil completion:completionHandler]; +} +- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testAddArgumentsWithParams:params completion:completionHandler]; +} +- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testSimpleArgumentRequestWithParams:params completion:completionHandler]; +} +- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params + completionHandler: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testStructArrayArgumentRequestWithParams:params completion:completionHandler]; +} +- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testStructArgumentRequestWithParams:params completion:completionHandler]; +} +- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testNestedStructArgumentRequestWithParams:params completion:completionHandler]; +} +- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testListStructArgumentRequestWithParams:params completion:completionHandler]; +} +- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testListInt8UArgumentRequestWithParams:params completion:completionHandler]; +} +- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testNestedStructListArgumentRequestWithParams:params completion:completionHandler]; +} +- (void)testListNestedStructListArgumentRequestWithParams: + (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testListNestedStructListArgumentRequestWithParams:params completion:completionHandler]; +} +- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testListInt8UReverseRequestWithParams:params completion:completionHandler]; +} +- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testEnumsRequestWithParams:params completion:completionHandler]; +} +- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params + completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testNullableOptionalRequestWithParams:params completion:completionHandler]; +} +- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params + completionHandler: + (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testComplexNullableOptionalRequestWithParams:params completion:completionHandler]; +} +- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self simpleStructEchoRequestWithParams:params completion:completionHandler]; +} +- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self timedInvokeRequestWithParams:params completion:completionHandler]; +} +- (void)timedInvokeRequestWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self timedInvokeRequestWithParams:nil completion:completionHandler]; +} +- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testSimpleOptionalArgumentRequestWithParams:params completion:completionHandler]; +} +- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testEmitTestEventRequestWithParams:params completion:completionHandler]; +} +- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + completionHandler: + (void (^)( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testEmitTestFabricScopedEventRequestWithParams:params completion:completionHandler]; } -- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeBooleanWithCompletion:completionHandler]; } -- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + [self writeAttributeBooleanWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBooleanWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBooleanWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBooleanWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (void)readAttributeBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBitmap8WithCompletion:completionHandler]; +} +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBitmap8WithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBitmap8WithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBitmap8WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBitmap8WithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.floatValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); +- (void)readAttributeBitmap16WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBitmap16WithCompletion:completionHandler]; +} +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBitmap16WithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBitmap16WithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBitmap16WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBitmap16WithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); +- (void)readAttributeBitmap32WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBitmap32WithCompletion:completionHandler]; +} +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBitmap32WithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBitmap32WithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBitmap32WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBitmap32WithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)subscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeBitmap64WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRFloatAttributeCallbackSubscriptionBridge * callbackBridge = new MTRFloatAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeBitmap64WithCompletion:completionHandler]; +} +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBitmap64WithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBitmap64WithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeBitmap64WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBitmap64WithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRFloatAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt8uWithCompletion:completionHandler]; +} +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt8uWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt8uWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInt8uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt8uWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -+ (void)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeInt16uWithCompletion:completionHandler]; +} +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt16uWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt16uWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInt16uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt16uWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)readAttributeFloatDoubleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRDoubleAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeInt24uWithCompletion:completionHandler]; +} +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt24uWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt24uWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInt24uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt24uWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt32uWithCompletion:completionHandler]; +} +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt32uWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt32uWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInt32uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt32uWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt40uWithCompletion:completionHandler]; +} +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt40uWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt40uWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInt40uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt40uWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeInt48uWithCompletion:completionHandler]; } -- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.doubleValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeInt48uWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRDoubleAttributeCallbackSubscriptionBridge * callbackBridge = new MTRDoubleAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRDoubleAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeInt48uWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeInt48uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeOctetStringWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeInt48uWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeOctetStringWithValue:(NSData * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeInt56uWithCompletion:completionHandler]; } -- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asByteSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeInt56uWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROctetStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeInt56uWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTROctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeInt56uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeListInt8uWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListInt8uListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeInt56uWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeListInt8uWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeInt64uWithCompletion:completionHandler]; } -- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeInt64uWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeInt64uWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRTestClusterListInt8uListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeInt64uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeListOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListOctetStringListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeInt64uWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeListOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeInt8sWithCompletion:completionHandler]; } -- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSData *) value[i_0]; - listHolder_0->mList[i_0] = [self asByteSpan:element_0]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeInt8sWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeInt8sWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRTestClusterListOctetStringListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self NewsubscribeAttributeInt8sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)readAttributeListStructOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListStructOctetStringListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeInt8sWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeInt16sWithCompletion:completionHandler]; } -- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRTestClusterClusterTestListStructOctet class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTestClusterClusterTestListStructOctet *) value[i_0]; - listHolder_0->mList[i_0].member1 = element_0.member1.unsignedLongLongValue; - listHolder_0->mList[i_0].member2 = [self asByteSpan:element_0.member2]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeInt16sWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt16sWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInt16sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeInt16sWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -+ (void)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListStructOctetStringListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeInt24sWithCompletion:completionHandler]; } - -- (void)readAttributeLongOctetStringWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTROctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeInt24sWithValue:value params:nil completion:completionHandler]; } - -- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeLongOctetStringWithValue:(NSData * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeInt24sWithValue:value params:params completion:completionHandler]; } -- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asByteSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeInt24sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTROctetStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTROctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTROctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeInt24sWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -+ (void)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTROctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeInt32sWithCompletion:completionHandler]; } - -- (void)readAttributeCharStringWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeInt32sWithValue:value params:nil completion:completionHandler]; } - -- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeCharStringWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeInt32sWithValue:value params:params completion:completionHandler]; } -- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeInt32sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeInt32sWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -+ (void)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeInt40sWithCompletion:completionHandler]; } - -- (void)readAttributeLongCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeInt40sWithValue:value params:nil completion:completionHandler]; } - -- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeLongCharStringWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeInt40sWithValue:value params:params completion:completionHandler]; } -- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeInt40sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -- (void)subscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self readAttributeInt40sWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -+ (void)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeInt48sWithCompletion:completionHandler]; } - -- (void)readAttributeEpochUsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - new MTRInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self writeAttributeInt48sWithValue:value params:nil completion:completionHandler]; } - -- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeEpochUsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeInt48sWithValue:value params:params completion:completionHandler]; } -- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self NewsubscribeAttributeInt48sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt48sWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)subscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt64uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + [self readAttributeInt56sWithCompletion:completionHandler]; +} +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt56sWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt56sWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInt56sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt56sWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +- (void)readAttributeInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt64sWithCompletion:completionHandler]; +} +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt64sWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInt64sWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeInt64sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInt64sWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -+ (void)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeEnum8WithCompletion:completionHandler]; +} +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEnum8WithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEnum8WithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeEpochSWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self NewsubscribeAttributeEnum8WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEnum8WithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeEpochSWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self readAttributeEnum16WithCompletion:completionHandler]; } -- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEnum16WithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeEnum16WithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeEnum16WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - -+ (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeEnum16WithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; } -- (void)readAttributeVendorIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFloatSingleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFloatSingleWithCompletion:completionHandler]; } - -- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeVendorIdWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeFloatSingleWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeFloatSingleWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRVendorIdAttributeCallbackSubscriptionBridge * callbackBridge = new MTRVendorIdAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRVendorIdAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeFloatSingleWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFloatSingleWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -+ (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFloatDoubleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFloatDoubleWithCompletion:completionHandler]; +} +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeFloatDoubleWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeFloatDoubleWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeFloatDoubleWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFloatDoubleWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)readAttributeListNullablesAndOptionalsStructWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOctetStringWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeOctetStringWithCompletion:completionHandler]; +} +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOctetStringWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOctetStringWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeOctetStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOctetStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeListInt8uWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self readAttributeListInt8uWithCompletion:completionHandler]; } -- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + [self writeAttributeListInt8uWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeListInt8uWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeListInt8uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeListInt8uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (void)readAttributeListOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeListOctetStringWithCompletion:completionHandler]; +} +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeListOctetStringWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeListOctetStringWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeListOctetStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeListOctetStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRTestClusterClusterNullablesAndOptionalsStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTestClusterClusterNullablesAndOptionalsStruct *) value[i_0]; - if (element_0.nullableInt == nil) { - listHolder_0->mList[i_0].nullableInt.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableInt.SetNonNull(); - nonNullValue_2 = element_0.nullableInt.unsignedShortValue; - } - if (element_0.optionalInt != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalInt.Emplace(); - definedValue_2 = element_0.optionalInt.unsignedShortValue; - } - if (element_0.nullableOptionalInt != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalInt.Emplace(); - if (element_0.nullableOptionalInt == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = element_0.nullableOptionalInt.unsignedShortValue; - } - } - if (element_0.nullableString == nil) { - listHolder_0->mList[i_0].nullableString.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableString.SetNonNull(); - nonNullValue_2 = [self asCharSpan:element_0.nullableString]; - } - if (element_0.optionalString != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalString.Emplace(); - definedValue_2 = [self asCharSpan:element_0.optionalString]; - } - if (element_0.nullableOptionalString != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalString.Emplace(); - if (element_0.nullableOptionalString == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = [self asCharSpan:element_0.nullableOptionalString]; - } - } - if (element_0.nullableStruct == nil) { - listHolder_0->mList[i_0].nullableStruct.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableStruct.SetNonNull(); - nonNullValue_2.a = element_0.nullableStruct.a.unsignedCharValue; - nonNullValue_2.b = element_0.nullableStruct.b.boolValue; - nonNullValue_2.c = static_cast>( - element_0.nullableStruct.c.unsignedCharValue); - nonNullValue_2.d = [self asByteSpan:element_0.nullableStruct.d]; - nonNullValue_2.e = [self asCharSpan:element_0.nullableStruct.e]; - nonNullValue_2.f = static_cast>( - element_0.nullableStruct.f.unsignedCharValue); - nonNullValue_2.g = element_0.nullableStruct.g.floatValue; - nonNullValue_2.h = element_0.nullableStruct.h.doubleValue; - } - if (element_0.optionalStruct != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalStruct.Emplace(); - definedValue_2.a = element_0.optionalStruct.a.unsignedCharValue; - definedValue_2.b = element_0.optionalStruct.b.boolValue; - definedValue_2.c = static_cast>( - element_0.optionalStruct.c.unsignedCharValue); - definedValue_2.d = [self asByteSpan:element_0.optionalStruct.d]; - definedValue_2.e = [self asCharSpan:element_0.optionalStruct.e]; - definedValue_2.f = static_cast>( - element_0.optionalStruct.f.unsignedCharValue); - definedValue_2.g = element_0.optionalStruct.g.floatValue; - definedValue_2.h = element_0.optionalStruct.h.doubleValue; - } - if (element_0.nullableOptionalStruct != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalStruct.Emplace(); - if (element_0.nullableOptionalStruct == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3.a = element_0.nullableOptionalStruct.a.unsignedCharValue; - nonNullValue_3.b = element_0.nullableOptionalStruct.b.boolValue; - nonNullValue_3.c = static_cast>( - element_0.nullableOptionalStruct.c.unsignedCharValue); - nonNullValue_3.d = [self asByteSpan:element_0.nullableOptionalStruct.d]; - nonNullValue_3.e = [self asCharSpan:element_0.nullableOptionalStruct.e]; - nonNullValue_3.f = static_cast>( - element_0.nullableOptionalStruct.f.unsignedCharValue); - nonNullValue_3.g = element_0.nullableOptionalStruct.g.floatValue; - nonNullValue_3.h = element_0.nullableOptionalStruct.h.doubleValue; - } - } - if (element_0.nullableList == nil) { - listHolder_0->mList[i_0].nullableList.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableList.SetNonNull(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (element_0.nullableList.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.nullableList.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < element_0.nullableList.count; ++i_3) { - if (![element_0.nullableList[i_3] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_3 = (NSNumber *) element_0.nullableList[i_3]; - listHolder_3->mList[i_3] - = static_castmList[i_3])>>( - element_3.unsignedCharValue); - } - nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.nullableList.count); - } else { - nonNullValue_2 = ListType_3(); - } - } - } - if (element_0.optionalList != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalList.Emplace(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (element_0.optionalList.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.optionalList.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < element_0.optionalList.count; ++i_3) { - if (![element_0.optionalList[i_3] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_3 = (NSNumber *) element_0.optionalList[i_3]; - listHolder_3->mList[i_3] - = static_castmList[i_3])>>( - element_3.unsignedCharValue); - } - definedValue_2 = ListType_3(listHolder_3->mList, element_0.optionalList.count); - } else { - definedValue_2 = ListType_3(); - } - } - } - if (element_0.nullableOptionalList != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalList.Emplace(); - if (element_0.nullableOptionalList == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - { - using ListType_4 = std::remove_reference_t; - using ListMemberType_4 = ListMemberTypeGetter::Type; - if (element_0.nullableOptionalList.count != 0) { - auto * listHolder_4 - = new ListHolder(element_0.nullableOptionalList.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_0.nullableOptionalList.count; ++i_4) { - if (![element_0.nullableOptionalList[i_4] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_4 = (NSNumber *) element_0.nullableOptionalList[i_4]; - listHolder_4->mList[i_4] - = static_castmList[i_4])>>( - element_4.unsignedCharValue); - } - nonNullValue_3 = ListType_4(listHolder_4->mList, element_0.nullableOptionalList.count); - } else { - nonNullValue_3 = ListType_4(); - } - } - } - } - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); +- (void)readAttributeListStructOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeListStructOctetStringWithCompletion:completionHandler]; +} +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeListStructOctetStringWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeListStructOctetStringWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeListStructOctetStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeListStructOctetStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); +- (void)readAttributeLongOctetStringWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLongOctetStringWithCompletion:completionHandler]; +} +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLongOctetStringWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLongOctetStringWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLongOctetStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLongOctetStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeCharStringWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCharStringWithCompletion:completionHandler]; +} +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeCharStringWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeCharStringWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeCharStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCharStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeLongCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeLongCharStringWithCompletion:completionHandler]; +} +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLongCharStringWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLongCharStringWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeLongCharStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLongCharStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeEpochUsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEpochUsWithCompletion:completionHandler]; +} +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEpochUsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEpochUsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeEpochUsWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEpochUsWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; +} + +- (void)readAttributeEpochSWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEpochSWithCompletion:completionHandler]; +} +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEpochSWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEpochSWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeEpochSWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEpochSWithAttributeCache:attributeCacheContainer endpoint:endpoint queue:queue completion:completionHandler]; +} + +- (void)readAttributeVendorIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorIdWithCompletion:completionHandler]; +} +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeVendorIdWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeVendorIdWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeVendorIdWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorIdWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } +- (void)readAttributeListNullablesAndOptionalsStructWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeListNullablesAndOptionalsStructWithCompletion:completionHandler]; +} +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeListNullablesAndOptionalsStructWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeListNullablesAndOptionalsStructWithValue:value params:params completion:completionHandler]; +} - (void)subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge * innerCallbackBridge - = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeListNullablesAndOptionalsStructWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeListNullablesAndOptionalsStructWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeEnumAttrWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeEnumAttrWithCompletion:completionHandler]; } - -- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeEnumAttrWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeEnumAttrWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeEnumAttrWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeEnumAttrWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeStructAttrWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterStructAttrStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeStructAttrWithCompletion:completionHandler]; } - - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeStructAttrWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - TypeInfo::Type cppValue; - cppValue.a = value.a.unsignedCharValue; - cppValue.b = value.b.boolValue; - cppValue.c = static_cast>(value.c.unsignedCharValue); - cppValue.d = [self asByteSpan:value.d]; - cppValue.e = [self asCharSpan:value.e]; - cppValue.f = static_cast>(value.f.unsignedCharValue); - cppValue.g = value.g.floatValue; - cppValue.h = value.h.doubleValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeStructAttrWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeStructAttrWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterStructAttrStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeStructAttrWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRangeRestrictedInt8uWithCompletion:completionHandler]; } - -- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeRangeRestrictedInt8uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeRangeRestrictedInt8uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRangeRestrictedInt8uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRangeRestrictedInt8uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } +- (void)readAttributeRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRangeRestrictedInt8sWithCompletion:completionHandler]; +} +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRangeRestrictedInt8sWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRangeRestrictedInt8sWithValue:value params:params completion:completionHandler]; +} - (void)subscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRangeRestrictedInt8sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRangeRestrictedInt8sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRangeRestrictedInt16uWithCompletion:completionHandler]; } - - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeRangeRestrictedInt16uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeRangeRestrictedInt16uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRangeRestrictedInt16uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRangeRestrictedInt16uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeRangeRestrictedInt16sWithCompletion:completionHandler]; } - - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeRangeRestrictedInt16sWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeRangeRestrictedInt16sWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16sAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeRangeRestrictedInt16sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeRangeRestrictedInt16sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeListLongOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListLongOctetStringListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeListLongOctetStringWithCompletion:completionHandler]; } - -- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeListLongOctetStringWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSData *) value[i_0]; - listHolder_0->mList[i_0] = [self asByteSpan:element_0]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeListLongOctetStringWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeListLongOctetStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeListLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListLongOctetStringListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeListLongOctetStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ // Make a copy of params before we go async. - params = [params copy]; - new MTRTestClusterListFabricScopedListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); +{ + [self readAttributeListFabricScopedWithParams:params completion:completionHandler]; } - -- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeListFabricScopedWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRTestClusterClusterTestFabricScoped class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTestClusterClusterTestFabricScoped *) value[i_0]; - listHolder_0->mList[i_0].fabricSensitiveInt8u = element_0.fabricSensitiveInt8u.unsignedCharValue; - if (element_0.optionalFabricSensitiveInt8u != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalFabricSensitiveInt8u.Emplace(); - definedValue_2 = element_0.optionalFabricSensitiveInt8u.unsignedCharValue; - } - if (element_0.nullableFabricSensitiveInt8u == nil) { - listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNonNull(); - nonNullValue_2 = element_0.nullableFabricSensitiveInt8u.unsignedCharValue; - } - if (element_0.nullableOptionalFabricSensitiveInt8u != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalFabricSensitiveInt8u.Emplace(); - if (element_0.nullableOptionalFabricSensitiveInt8u == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = element_0.nullableOptionalFabricSensitiveInt8u.unsignedCharValue; - } - } - listHolder_0->mList[i_0].fabricSensitiveCharString = [self asCharSpan:element_0.fabricSensitiveCharString]; - listHolder_0->mList[i_0].fabricSensitiveStruct.a = element_0.fabricSensitiveStruct.a.unsignedCharValue; - listHolder_0->mList[i_0].fabricSensitiveStruct.b = element_0.fabricSensitiveStruct.b.boolValue; - listHolder_0->mList[i_0].fabricSensitiveStruct.c - = static_castmList[i_0].fabricSensitiveStruct.c)>>( - element_0.fabricSensitiveStruct.c.unsignedCharValue); - listHolder_0->mList[i_0].fabricSensitiveStruct.d = [self asByteSpan:element_0.fabricSensitiveStruct.d]; - listHolder_0->mList[i_0].fabricSensitiveStruct.e = [self asCharSpan:element_0.fabricSensitiveStruct.e]; - listHolder_0->mList[i_0].fabricSensitiveStruct.f - = static_castmList[i_0].fabricSensitiveStruct.f)>>( - element_0.fabricSensitiveStruct.f.unsignedCharValue); - listHolder_0->mList[i_0].fabricSensitiveStruct.g = element_0.fabricSensitiveStruct.g.floatValue; - listHolder_0->mList[i_0].fabricSensitiveStruct.h = element_0.fabricSensitiveStruct.h.doubleValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].fabricSensitiveInt8uList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.fabricSensitiveInt8uList.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.fabricSensitiveInt8uList.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.fabricSensitiveInt8uList.count; ++i_2) { - if (![element_0.fabricSensitiveInt8uList[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.fabricSensitiveInt8uList[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedCharValue; - } - listHolder_0->mList[i_0].fabricSensitiveInt8uList - = ListType_2(listHolder_2->mList, element_0.fabricSensitiveInt8uList.count); - } else { - listHolder_0->mList[i_0].fabricSensitiveInt8uList = ListType_2(); - } - } - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeListFabricScopedWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeListFabricScopedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeListFabricScopedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterListFabricScopedListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeListFabricScopedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeTimedWriteBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeTimedWriteBooleanWithCompletion:completionHandler]; } - -- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeTimedWriteBooleanWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeTimedWriteBooleanWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeTimedWriteBooleanWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeTimedWriteBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeTimedWriteBooleanWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeGeneralErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeGeneralErrorBooleanWithCompletion:completionHandler]; } - -- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeGeneralErrorBooleanWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeGeneralErrorBooleanWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeGeneralErrorBooleanWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeGeneralErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGeneralErrorBooleanWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeClusterErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeClusterErrorBooleanWithCompletion:completionHandler]; } - -- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeClusterErrorBooleanWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeClusterErrorBooleanWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeClusterErrorBooleanWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeClusterErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterErrorBooleanWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeUnsupportedWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeUnsupportedWithCompletion:completionHandler]; } - -- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeUnsupportedWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeUnsupportedWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRBooleanAttributeCallbackSubscriptionBridge * callbackBridge = new MTRBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeUnsupportedWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeUnsupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeUnsupportedWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableBooleanAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableBooleanWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableBooleanWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.boolValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableBooleanWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableBooleanAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableBooleanAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableBooleanWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableBooleanWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap8AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRTestClusterNullableBitmap8AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeNullableBitmap16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRTestClusterNullableBitmap16AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self readAttributeNullableBitmap8WithCompletion:completionHandler]; } -- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedShortValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNullableBitmap8WithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self writeAttributeNullableBitmap8WithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNullableBitmap8WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNullableBitmap8WithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } +- (void)readAttributeNullableBitmap16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNullableBitmap16WithCompletion:completionHandler]; +} +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNullableBitmap16WithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNullableBitmap16WithValue:value params:params completion:completionHandler]; +} +- (void) + subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNullableBitmap16WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} + (void)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap16AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableBitmap16WithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableBitmap32WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap32AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableBitmap32WithCompletion:completionHandler]; } - -- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableBitmap32WithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedIntValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableBitmap32WithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableBitmap32WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap32AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableBitmap32WithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableBitmap64WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap64AttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableBitmap64WithCompletion:completionHandler]; } - -- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableBitmap64WithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedLongLongValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableBitmap64WithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableBitmap64WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableBitmap64AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableBitmap64WithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt8uWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt8uWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt8uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt8uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt8uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt8uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt16uWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt16uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt16uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt16uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt16uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt24uWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt24uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt24uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt24uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNullableInt24uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt32uWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt32uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt32uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt32uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt32uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt32uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt40uWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt40uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt40uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt40uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt40uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt48uWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt48uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt48uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt48uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt48uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt56uWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt56uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt56uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt56uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt56uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt64uWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt64uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt64uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt64uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt64uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt64uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt8sWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt8sWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt8sWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.charValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt8sWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNullableInt8sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNullableInt8sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt16sWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt16sWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt16sWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt16sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt16sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt24sWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt24sWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.intValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt24sWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt32sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt24sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt24sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt32sWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt32sWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.intValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt32sWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt32sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt32sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt32sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt32sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt40sWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt40sWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt40sWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt64sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt40sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt40sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt48sWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt48sWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt48sWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt64sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt48sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeNullableInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt64sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); +{ + [self readAttributeNullableInt48sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } +- (void)readAttributeNullableInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNullableInt56sWithCompletion:completionHandler]; +} +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNullableInt56sWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNullableInt56sWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNullableInt56sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} + (void)readAttributeNullableInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt56sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableInt64sWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt64sWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableInt64sWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt64sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt64sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt64sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableInt64sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableInt64sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableEnum8WithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableEnum8WithCompletion:completionHandler]; } - -- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableEnum8WithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableEnum8WithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableEnum8WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableEnum8WithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableEnum16WithCompletion:completionHandler]; } - -- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableEnum16WithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableEnum16WithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableEnum16WithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableEnum16WithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableFloatSingleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableFloatAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableFloatSingleWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableFloatSingleWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.floatValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableFloatSingleWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableFloatAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableFloatAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableFloatAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableFloatSingleWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableFloatSingleWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableFloatDoubleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableDoubleAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableFloatDoubleWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableFloatDoubleWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.doubleValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableFloatDoubleWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableDoubleAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableDoubleAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableDoubleAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new MTRNullableDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeNullableOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new MTRNullableOctetStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableOctetStringWithValue:(NSData * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = [self asByteSpan:value]; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNullableFloatDoubleWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNullableFloatDoubleWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } +- (void)readAttributeNullableOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNullableOctetStringWithCompletion:completionHandler]; +} +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNullableOctetStringWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNullableOctetStringWithValue:value params:params completion:completionHandler]; +} - (void)subscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableOctetStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableOctetStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableOctetStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableOctetStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableCharStringAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableCharStringWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableCharStringWithValue:(NSString * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableCharStringWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = [self asCharSpan:value]; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableCharStringWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableCharStringAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableCharStringAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableCharStringWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableCharStringWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableEnumAttrWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableEnumAttrWithCompletion:completionHandler]; } - -- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableEnumAttrWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableEnumAttrWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableEnumAttrWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableEnumAttrWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableStructWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableStructStructAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableStructWithCompletion:completionHandler]; } - - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeNullableStructWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.a = value.a.unsignedCharValue; - nonNullValue_0.b = value.b.boolValue; - nonNullValue_0.c = static_cast>(value.c.unsignedCharValue); - nonNullValue_0.d = [self asByteSpan:value.d]; - nonNullValue_0.e = [self asCharSpan:value.e]; - nonNullValue_0.f = static_cast>(value.f.unsignedCharValue); - nonNullValue_0.g = value.g.floatValue; - nonNullValue_0.h = value.h.doubleValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableStructWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableStructWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterNullableStructStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableStructWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableRangeRestrictedInt8uWithCompletion:completionHandler]; } - - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt8uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableRangeRestrictedInt8uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableRangeRestrictedInt8uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt8sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableRangeRestrictedInt8sWithCompletion:completionHandler]; } - - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt8sWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.charValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); -} - -- (void)subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt8sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt8sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt8sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - new MTRNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeNullableRangeRestrictedInt8sWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + [self NewsubscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; +} ++ (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNullableRangeRestrictedInt8sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableRangeRestrictedInt16uWithCompletion:completionHandler]; } - - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt16uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableRangeRestrictedInt16uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16uAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableRangeRestrictedInt16uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeNullableRangeRestrictedInt16sWithCompletion:completionHandler]; } - - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt16sWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeNullableRangeRestrictedInt16sWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRNullableInt16sAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRNullableInt16sAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeNullableRangeRestrictedInt16sWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeWriteOnlyInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeWriteOnlyInt8uWithCompletion:completionHandler]; } - -- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeWriteOnlyInt8uWithValue:value params:nil completion:completionHandler]; } - (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, self.device, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + [self writeAttributeWriteOnlyInt8uWithValue:value params:params completion:completionHandler]; } - - (void)subscribeAttributeWriteOnlyInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt8uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt8uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeWriteOnlyInt8uWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeWriteOnlyInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeWriteOnlyInt8uWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeGeneratedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeGeneratedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeGeneratedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAcceptedCommandListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAcceptedCommandListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAcceptedCommandListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterAttributeListListAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeAttributeListWithCompletion:completionHandler]; } - - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge * callbackBridge - = new MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeAttributeListWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRTestClusterAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeAttributeListWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeFeatureMapWithCompletion:completionHandler]; } - - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt32uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt32uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt32uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeFeatureMapWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFeatureMapWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(self.callbackQueue, self.device, completionHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self readAttributeClusterRevisionWithCompletion:completionHandler]; } - - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - minInterval = [minInterval copy]; - maxInterval = [maxInterval copy]; - params = [params copy]; - __block MTRInt16uAttributeCallbackSubscriptionBridge * callbackBridge = new MTRInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, self.device, reportHandler, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - - chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - MTRInt16uAttributeCallbackSubscriptionBridge * innerCallbackBridge = callbackBridge; - return cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue], - chip::NullOptional, [innerCallbackBridge](void) { delete innerCallbackBridge; }); - }, - subscriptionEstablishedHandler); + [self NewsubscribeAttributeClusterRevisionWithMinInterval:minInterval + maxInterval:maxInterval + params:params + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:reportHandler]; } - + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithAttributeCache:attributeCacheContainer + endpoint:endpoint + queue:queue + completion:completionHandler]; } -@end - -@implementation MTRBaseClusterTestCluster (Deprecated) - - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h index 0b23da80a62593..fe1c002b40ad80 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h @@ -1170,13 +1170,13 @@ class MTROctetStringAttributeCallbackSubscriptionBridge : public MTROctetStringA public: MTROctetStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROctetStringAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROctetStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROctetStringAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1184,7 +1184,7 @@ class MTROctetStringAttributeCallbackSubscriptionBridge : public MTROctetStringA static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOctetStringAttributeCallbackBridge : public MTRCallbackBridge @@ -1212,14 +1212,14 @@ class MTRNullableOctetStringAttributeCallbackSubscriptionBridge : public MTRNull MTRNullableOctetStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOctetStringAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableOctetStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOctetStringAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1227,7 +1227,7 @@ class MTRNullableOctetStringAttributeCallbackSubscriptionBridge : public MTRNull static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRCharStringAttributeCallbackBridge : public MTRCallbackBridge @@ -1253,13 +1253,13 @@ class MTRCharStringAttributeCallbackSubscriptionBridge : public MTRCharStringAtt public: MTRCharStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRCharStringAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRCharStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRCharStringAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1267,7 +1267,7 @@ class MTRCharStringAttributeCallbackSubscriptionBridge : public MTRCharStringAtt static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableCharStringAttributeCallbackBridge : public MTRCallbackBridge @@ -1295,14 +1295,14 @@ class MTRNullableCharStringAttributeCallbackSubscriptionBridge : public MTRNulla MTRNullableCharStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableCharStringAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableCharStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableCharStringAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1310,7 +1310,7 @@ class MTRNullableCharStringAttributeCallbackSubscriptionBridge : public MTRNulla static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBooleanAttributeCallbackBridge : public MTRCallbackBridge @@ -1336,13 +1336,13 @@ class MTRBooleanAttributeCallbackSubscriptionBridge : public MTRBooleanAttribute public: MTRBooleanAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBooleanAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBooleanAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBooleanAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1350,7 +1350,7 @@ class MTRBooleanAttributeCallbackSubscriptionBridge : public MTRBooleanAttribute static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableBooleanAttributeCallbackBridge : public MTRCallbackBridge @@ -1377,14 +1377,14 @@ class MTRNullableBooleanAttributeCallbackSubscriptionBridge : public MTRNullable MTRNullableBooleanAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableBooleanAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableBooleanAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableBooleanAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1392,7 +1392,7 @@ class MTRNullableBooleanAttributeCallbackSubscriptionBridge : public MTRNullable static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt8uAttributeCallbackBridge : public MTRCallbackBridge @@ -1418,13 +1418,13 @@ class MTRInt8uAttributeCallbackSubscriptionBridge : public MTRInt8uAttributeCall public: MTRInt8uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt8uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt8uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt8uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1432,7 +1432,7 @@ class MTRInt8uAttributeCallbackSubscriptionBridge : public MTRInt8uAttributeCall static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt8uAttributeCallbackBridge : public MTRCallbackBridge @@ -1458,13 +1458,15 @@ class MTRNullableInt8uAttributeCallbackSubscriptionBridge : public MTRNullableIn public: MTRNullableInt8uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt8uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt8uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt8uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1472,7 +1474,7 @@ class MTRNullableInt8uAttributeCallbackSubscriptionBridge : public MTRNullableIn static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt8sAttributeCallbackBridge : public MTRCallbackBridge @@ -1498,13 +1500,13 @@ class MTRInt8sAttributeCallbackSubscriptionBridge : public MTRInt8sAttributeCall public: MTRInt8sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt8sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt8sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt8sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1512,7 +1514,7 @@ class MTRInt8sAttributeCallbackSubscriptionBridge : public MTRInt8sAttributeCall static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt8sAttributeCallbackBridge : public MTRCallbackBridge @@ -1538,13 +1540,15 @@ class MTRNullableInt8sAttributeCallbackSubscriptionBridge : public MTRNullableIn public: MTRNullableInt8sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt8sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt8sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt8sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1552,7 +1556,7 @@ class MTRNullableInt8sAttributeCallbackSubscriptionBridge : public MTRNullableIn static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt16uAttributeCallbackBridge : public MTRCallbackBridge @@ -1578,13 +1582,13 @@ class MTRInt16uAttributeCallbackSubscriptionBridge : public MTRInt16uAttributeCa public: MTRInt16uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt16uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt16uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt16uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1592,7 +1596,7 @@ class MTRInt16uAttributeCallbackSubscriptionBridge : public MTRInt16uAttributeCa static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt16uAttributeCallbackBridge : public MTRCallbackBridge @@ -1618,13 +1622,15 @@ class MTRNullableInt16uAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt16uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt16uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt16uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt16uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1632,7 +1638,7 @@ class MTRNullableInt16uAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt16sAttributeCallbackBridge : public MTRCallbackBridge @@ -1658,13 +1664,13 @@ class MTRInt16sAttributeCallbackSubscriptionBridge : public MTRInt16sAttributeCa public: MTRInt16sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt16sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt16sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt16sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1672,7 +1678,7 @@ class MTRInt16sAttributeCallbackSubscriptionBridge : public MTRInt16sAttributeCa static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt16sAttributeCallbackBridge : public MTRCallbackBridge @@ -1698,13 +1704,15 @@ class MTRNullableInt16sAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt16sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt16sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt16sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt16sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1712,7 +1720,7 @@ class MTRNullableInt16sAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt32uAttributeCallbackBridge : public MTRCallbackBridge @@ -1738,13 +1746,13 @@ class MTRInt32uAttributeCallbackSubscriptionBridge : public MTRInt32uAttributeCa public: MTRInt32uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt32uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt32uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt32uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1752,7 +1760,7 @@ class MTRInt32uAttributeCallbackSubscriptionBridge : public MTRInt32uAttributeCa static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt32uAttributeCallbackBridge : public MTRCallbackBridge @@ -1778,13 +1786,15 @@ class MTRNullableInt32uAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt32uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt32uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt32uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt32uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1792,7 +1802,7 @@ class MTRNullableInt32uAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt32sAttributeCallbackBridge : public MTRCallbackBridge @@ -1818,13 +1828,13 @@ class MTRInt32sAttributeCallbackSubscriptionBridge : public MTRInt32sAttributeCa public: MTRInt32sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt32sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt32sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt32sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1832,7 +1842,7 @@ class MTRInt32sAttributeCallbackSubscriptionBridge : public MTRInt32sAttributeCa static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt32sAttributeCallbackBridge : public MTRCallbackBridge @@ -1858,13 +1868,15 @@ class MTRNullableInt32sAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt32sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt32sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt32sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt32sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1872,7 +1884,7 @@ class MTRNullableInt32sAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt64uAttributeCallbackBridge : public MTRCallbackBridge @@ -1898,13 +1910,13 @@ class MTRInt64uAttributeCallbackSubscriptionBridge : public MTRInt64uAttributeCa public: MTRInt64uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt64uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt64uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt64uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1912,7 +1924,7 @@ class MTRInt64uAttributeCallbackSubscriptionBridge : public MTRInt64uAttributeCa static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt64uAttributeCallbackBridge : public MTRCallbackBridge @@ -1938,13 +1950,15 @@ class MTRNullableInt64uAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt64uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt64uAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt64uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt64uAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1952,7 +1966,7 @@ class MTRNullableInt64uAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRInt64sAttributeCallbackBridge : public MTRCallbackBridge @@ -1978,13 +1992,13 @@ class MTRInt64sAttributeCallbackSubscriptionBridge : public MTRInt64sAttributeCa public: MTRInt64sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt64sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRInt64sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRInt64sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -1992,7 +2006,7 @@ class MTRInt64sAttributeCallbackSubscriptionBridge : public MTRInt64sAttributeCa static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableInt64sAttributeCallbackBridge : public MTRCallbackBridge @@ -2018,13 +2032,15 @@ class MTRNullableInt64sAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt64sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt64sAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableInt64sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableInt64sAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2032,7 +2048,7 @@ class MTRNullableInt64sAttributeCallbackSubscriptionBridge : public MTRNullableI static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFloatAttributeCallbackBridge : public MTRCallbackBridge @@ -2058,13 +2074,13 @@ class MTRFloatAttributeCallbackSubscriptionBridge : public MTRFloatAttributeCall public: MTRFloatAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFloatAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFloatAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRFloatAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2072,7 +2088,7 @@ class MTRFloatAttributeCallbackSubscriptionBridge : public MTRFloatAttributeCall static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableFloatAttributeCallbackBridge : public MTRCallbackBridge @@ -2098,13 +2114,15 @@ class MTRNullableFloatAttributeCallbackSubscriptionBridge : public MTRNullableFl public: MTRNullableFloatAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableFloatAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableFloatAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableFloatAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2112,7 +2130,7 @@ class MTRNullableFloatAttributeCallbackSubscriptionBridge : public MTRNullableFl static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoubleAttributeCallbackBridge : public MTRCallbackBridge @@ -2138,13 +2156,13 @@ class MTRDoubleAttributeCallbackSubscriptionBridge : public MTRDoubleAttributeCa public: MTRDoubleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoubleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoubleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoubleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2152,7 +2170,7 @@ class MTRDoubleAttributeCallbackSubscriptionBridge : public MTRDoubleAttributeCa static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoubleAttributeCallbackBridge : public MTRCallbackBridge @@ -2178,13 +2196,15 @@ class MTRNullableDoubleAttributeCallbackSubscriptionBridge : public MTRNullableD public: MTRNullableDoubleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoubleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoubleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoubleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2192,7 +2212,7 @@ class MTRNullableDoubleAttributeCallbackSubscriptionBridge : public MTRNullableD static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRVendorIdAttributeCallbackBridge : public MTRCallbackBridge @@ -2218,13 +2238,13 @@ class MTRVendorIdAttributeCallbackSubscriptionBridge : public MTRVendorIdAttribu public: MTRVendorIdAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRVendorIdAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRVendorIdAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRVendorIdAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2232,7 +2252,7 @@ class MTRVendorIdAttributeCallbackSubscriptionBridge : public MTRVendorIdAttribu static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableVendorIdAttributeCallbackBridge : public MTRCallbackBridge @@ -2259,14 +2279,14 @@ class MTRNullableVendorIdAttributeCallbackSubscriptionBridge : public MTRNullabl MTRNullableVendorIdAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableVendorIdAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableVendorIdAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableVendorIdAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2274,7 +2294,7 @@ class MTRNullableVendorIdAttributeCallbackSubscriptionBridge : public MTRNullabl static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIdentifyGeneratedCommandListListAttributeCallbackBridge @@ -2307,14 +2327,14 @@ class MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2322,7 +2342,7 @@ class MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIdentifyAcceptedCommandListListAttributeCallbackBridge @@ -2355,14 +2375,14 @@ class MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2370,7 +2390,7 @@ class MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIdentifyAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -2399,14 +2419,14 @@ class MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge : public M MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2414,7 +2434,7 @@ class MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupsGeneratedCommandListListAttributeCallbackBridge @@ -2447,14 +2467,14 @@ class MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2462,7 +2482,7 @@ class MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupsAcceptedCommandListListAttributeCallbackBridge @@ -2493,14 +2513,14 @@ class MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2508,7 +2528,7 @@ class MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -2536,14 +2556,14 @@ class MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge : public MTR MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2551,7 +2571,7 @@ class MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRScenesGeneratedCommandListListAttributeCallbackBridge @@ -2584,14 +2604,14 @@ class MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRScenesGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRScenesGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2599,7 +2619,7 @@ class MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRScenesAcceptedCommandListListAttributeCallbackBridge @@ -2630,14 +2650,14 @@ class MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRScenesAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRScenesAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2645,7 +2665,7 @@ class MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRScenesAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -2673,14 +2693,14 @@ class MTRScenesAttributeListListAttributeCallbackSubscriptionBridge : public MTR MTRScenesAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRScenesAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRScenesAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRScenesAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2688,7 +2708,7 @@ class MTRScenesAttributeListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffGeneratedCommandListListAttributeCallbackBridge @@ -2719,14 +2739,14 @@ class MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2734,7 +2754,7 @@ class MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffAcceptedCommandListListAttributeCallbackBridge @@ -2765,14 +2785,14 @@ class MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2780,7 +2800,7 @@ class MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -2808,14 +2828,14 @@ class MTROnOffAttributeListListAttributeCallbackSubscriptionBridge : public MTRO MTROnOffAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2823,7 +2843,7 @@ class MTROnOffAttributeListListAttributeCallbackSubscriptionBridge : public MTRO static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge @@ -2857,7 +2877,7 @@ class MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscr public: MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -2865,7 +2885,7 @@ class MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscr MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2873,7 +2893,7 @@ class MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge @@ -2907,14 +2927,14 @@ class MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscri public: MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2922,7 +2942,7 @@ class MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge @@ -2955,14 +2975,14 @@ class MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionB public: MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -2970,7 +2990,7 @@ class MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLevelControlGeneratedCommandListListAttributeCallbackBridge @@ -3000,17 +3020,16 @@ class MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRLevelControlGeneratedCommandListListAttributeCallbackBridge { public: - MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3018,7 +3037,7 @@ class MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLevelControlAcceptedCommandListListAttributeCallbackBridge @@ -3048,17 +3067,16 @@ class MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRLevelControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3066,7 +3084,7 @@ class MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLevelControlAttributeListListAttributeCallbackBridge @@ -3097,14 +3115,14 @@ class MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLevelControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLevelControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3112,7 +3130,7 @@ class MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge @@ -3145,14 +3163,14 @@ class MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBr public: MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3160,7 +3178,7 @@ class MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge @@ -3193,14 +3211,14 @@ class MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBri public: MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3208,7 +3226,7 @@ class MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBinaryInputBasicAttributeListListAttributeCallbackBridge @@ -3241,14 +3259,14 @@ class MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3256,7 +3274,7 @@ class MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorDeviceTypeListListAttributeCallbackBridge @@ -3290,14 +3308,14 @@ class MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorDeviceTypeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorDeviceTypeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3305,7 +3323,7 @@ class MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorServerListListAttributeCallbackBridge : public MTRCallbackBridge @@ -3334,14 +3352,14 @@ class MTRDescriptorServerListListAttributeCallbackSubscriptionBridge : public MT MTRDescriptorServerListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorServerListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorServerListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorServerListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3349,7 +3367,7 @@ class MTRDescriptorServerListListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorClientListListAttributeCallbackBridge : public MTRCallbackBridge @@ -3378,14 +3396,14 @@ class MTRDescriptorClientListListAttributeCallbackSubscriptionBridge : public MT MTRDescriptorClientListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorClientListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorClientListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorClientListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3393,7 +3411,7 @@ class MTRDescriptorClientListListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorPartsListListAttributeCallbackBridge : public MTRCallbackBridge @@ -3421,14 +3439,14 @@ class MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge : public MTR MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorPartsListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorPartsListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3436,7 +3454,7 @@ class MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorGeneratedCommandListListAttributeCallbackBridge @@ -3469,14 +3487,14 @@ class MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3484,7 +3502,7 @@ class MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorAcceptedCommandListListAttributeCallbackBridge @@ -3517,14 +3535,14 @@ class MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3532,7 +3550,7 @@ class MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDescriptorAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -3562,14 +3580,14 @@ class MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDescriptorAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3577,7 +3595,7 @@ class MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBindingBindingListAttributeCallbackBridge : public MTRCallbackBridge @@ -3607,14 +3625,14 @@ class MTRBindingBindingListAttributeCallbackSubscriptionBridge : public MTRBindi MTRBindingBindingListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBindingBindingListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBindingBindingListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBindingBindingListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3622,7 +3640,7 @@ class MTRBindingBindingListAttributeCallbackSubscriptionBridge : public MTRBindi static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBindingGeneratedCommandListListAttributeCallbackBridge @@ -3655,14 +3673,14 @@ class MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBindingGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBindingGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3670,7 +3688,7 @@ class MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBindingAcceptedCommandListListAttributeCallbackBridge @@ -3703,14 +3721,14 @@ class MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBindingAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBindingAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3718,7 +3736,7 @@ class MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBindingAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -3747,14 +3765,14 @@ class MTRBindingAttributeListListAttributeCallbackSubscriptionBridge : public MT MTRBindingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBindingAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBindingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBindingAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3762,7 +3780,7 @@ class MTRBindingAttributeListListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlAclListAttributeCallbackBridge : public MTRCallbackBridge @@ -3793,14 +3811,14 @@ class MTRAccessControlAclListAttributeCallbackSubscriptionBridge : public MTRAcc MTRAccessControlAclListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlAclListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccessControlAclListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlAclListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3808,7 +3826,7 @@ class MTRAccessControlAclListAttributeCallbackSubscriptionBridge : public MTRAcc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlExtensionListAttributeCallbackBridge : public MTRCallbackBridge @@ -3840,14 +3858,14 @@ class MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge : public MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlExtensionListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlExtensionListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3855,7 +3873,7 @@ class MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlGeneratedCommandListListAttributeCallbackBridge @@ -3885,17 +3903,16 @@ class MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridg : public MTRAccessControlGeneratedCommandListListAttributeCallbackBridge { public: - MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3903,7 +3920,7 @@ class MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlAcceptedCommandListListAttributeCallbackBridge @@ -3933,17 +3950,16 @@ class MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRAccessControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3951,7 +3967,7 @@ class MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlAttributeListListAttributeCallbackBridge @@ -3984,14 +4000,14 @@ class MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3999,7 +4015,7 @@ class MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsActionListListAttributeCallbackBridge : public MTRCallbackBridge @@ -4029,14 +4045,14 @@ class MTRActionsActionListListAttributeCallbackSubscriptionBridge : public MTRAc MTRActionsActionListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsActionListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsActionListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsActionListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4044,7 +4060,7 @@ class MTRActionsActionListListAttributeCallbackSubscriptionBridge : public MTRAc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsEndpointListsListAttributeCallbackBridge : public MTRCallbackBridge @@ -4076,14 +4092,14 @@ class MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge : public MT MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsEndpointListsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsEndpointListsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4091,7 +4107,7 @@ class MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsGeneratedCommandListListAttributeCallbackBridge @@ -4124,14 +4140,14 @@ class MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4139,7 +4155,7 @@ class MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsAcceptedCommandListListAttributeCallbackBridge @@ -4172,14 +4188,14 @@ class MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4187,7 +4203,7 @@ class MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -4216,14 +4232,14 @@ class MTRActionsAttributeListListAttributeCallbackSubscriptionBridge : public MT MTRActionsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4231,7 +4247,7 @@ class MTRActionsAttributeListListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBasicCapabilityMinimaStructAttributeCallbackBridge : public MTRCallbackBridge @@ -4262,14 +4278,14 @@ class MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBasicCapabilityMinimaStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBasicCapabilityMinimaStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4277,7 +4293,7 @@ class MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBasicGeneratedCommandListListAttributeCallbackBridge @@ -4308,14 +4324,14 @@ class MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBasicGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBasicGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4323,7 +4339,7 @@ class MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBasicAcceptedCommandListListAttributeCallbackBridge @@ -4354,14 +4370,14 @@ class MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBasicAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBasicAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4369,7 +4385,7 @@ class MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBasicAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -4397,14 +4413,14 @@ class MTRBasicAttributeListListAttributeCallbackSubscriptionBridge : public MTRB MTRBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBasicAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBasicAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4412,7 +4428,7 @@ class MTRBasicAttributeListListAttributeCallbackSubscriptionBridge : public MTRB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge @@ -4447,7 +4463,7 @@ class MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubsc public: MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -4455,7 +4471,7 @@ class MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubsc MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4463,7 +4479,7 @@ class MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge @@ -4497,7 +4513,7 @@ class MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscr public: MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -4505,7 +4521,7 @@ class MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscr MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4513,7 +4529,7 @@ class MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge @@ -4546,14 +4562,14 @@ class MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscription public: MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4561,7 +4577,7 @@ class MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge @@ -4598,7 +4614,7 @@ class MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubsc public: MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -4606,7 +4622,7 @@ class MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubsc MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4614,7 +4630,7 @@ class MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge @@ -4649,7 +4665,7 @@ class MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubs public: MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -4657,7 +4673,7 @@ class MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubs MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4665,7 +4681,7 @@ class MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge @@ -4700,7 +4716,7 @@ class MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubsc public: MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -4708,7 +4724,7 @@ class MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubsc MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4716,7 +4732,7 @@ class MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge @@ -4749,14 +4765,14 @@ class MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptio public: MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4764,7 +4780,7 @@ class MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge @@ -4798,14 +4814,14 @@ class MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscript public: MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4813,7 +4829,7 @@ class MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge @@ -4848,7 +4864,7 @@ class MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubsc public: MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -4856,7 +4872,7 @@ class MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubsc MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4864,7 +4880,7 @@ class MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge @@ -4898,7 +4914,7 @@ class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscr public: MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -4906,7 +4922,7 @@ class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscr MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4914,7 +4930,7 @@ class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge @@ -4947,14 +4963,14 @@ class MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscription public: MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -4962,7 +4978,7 @@ class MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge @@ -4998,7 +5014,7 @@ class MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscr public: MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -5006,7 +5022,7 @@ class MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscr MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5014,7 +5030,7 @@ class MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge @@ -5048,14 +5064,14 @@ class MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscrip public: MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5063,7 +5079,7 @@ class MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge @@ -5097,14 +5113,14 @@ class MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscript public: MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5112,7 +5128,7 @@ class MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge @@ -5145,14 +5161,14 @@ class MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBri public: MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5160,7 +5176,7 @@ class MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge @@ -5193,14 +5209,14 @@ class MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBr public: MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5208,7 +5224,7 @@ class MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge @@ -5241,14 +5257,14 @@ class MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBri public: MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5256,7 +5272,7 @@ class MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUnitLocalizationAttributeListListAttributeCallbackBridge @@ -5289,14 +5305,14 @@ class MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5304,7 +5320,7 @@ class MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge @@ -5334,17 +5350,16 @@ class MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge : public MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge { public: - MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5352,7 +5367,7 @@ class MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge @@ -5386,7 +5401,7 @@ class MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscr public: MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -5394,7 +5409,7 @@ class MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscr MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5402,7 +5417,7 @@ class MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge @@ -5436,14 +5451,14 @@ class MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscri public: MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5451,7 +5466,7 @@ class MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge @@ -5484,14 +5499,14 @@ class MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionB public: MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5499,7 +5514,7 @@ class MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge @@ -5533,14 +5548,14 @@ class MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5548,7 +5563,7 @@ class MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge @@ -5582,14 +5597,14 @@ class MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5597,7 +5612,7 @@ class MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge @@ -5628,17 +5643,16 @@ class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge : public MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge { public: - MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5646,7 +5660,7 @@ class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge @@ -5676,17 +5690,16 @@ class MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge { public: - MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5694,7 +5707,7 @@ class MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge @@ -5727,14 +5740,14 @@ class MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5742,7 +5755,7 @@ class MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceAttributeListListAttributeCallbackBridge @@ -5773,14 +5786,14 @@ class MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5788,7 +5801,7 @@ class MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge @@ -5824,7 +5837,7 @@ class MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscr public: MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -5832,7 +5845,7 @@ class MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscr MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5840,7 +5853,7 @@ class MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge @@ -5874,14 +5887,14 @@ class MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscripti public: MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5889,7 +5902,7 @@ class MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge @@ -5922,14 +5935,14 @@ class MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptio public: MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5937,7 +5950,7 @@ class MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningAttributeListListAttributeCallbackBridge @@ -5967,17 +5980,16 @@ class MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridg : public MTRGeneralCommissioningAttributeListListAttributeCallbackBridge { public: - MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -5985,7 +5997,7 @@ class MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningNetworksListAttributeCallbackBridge @@ -6021,14 +6033,14 @@ class MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningNetworksListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningNetworksListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6036,7 +6048,7 @@ class MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge @@ -6070,14 +6082,14 @@ class MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscripti public: MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6085,7 +6097,7 @@ class MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge @@ -6118,14 +6130,14 @@ class MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptio public: MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6133,7 +6145,7 @@ class MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningAttributeListListAttributeCallbackBridge @@ -6163,17 +6175,16 @@ class MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridg : public MTRNetworkCommissioningAttributeListListAttributeCallbackBridge { public: - MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6181,7 +6192,7 @@ class MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge @@ -6214,14 +6225,14 @@ class MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBrid public: MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6229,7 +6240,7 @@ class MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge @@ -6259,17 +6270,16 @@ class MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridg : public MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge { public: - MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6277,7 +6287,7 @@ class MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsAttributeListListAttributeCallbackBridge @@ -6310,14 +6320,14 @@ class MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6325,7 +6335,7 @@ class MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge @@ -6360,14 +6370,14 @@ class MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBri public: MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6375,7 +6385,7 @@ class MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge @@ -6408,14 +6418,14 @@ class MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscription public: MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6423,7 +6433,7 @@ class MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge @@ -6456,14 +6466,14 @@ class MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBri public: MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6471,7 +6481,7 @@ class MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge @@ -6504,14 +6514,14 @@ class MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionB public: MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6519,7 +6529,7 @@ class MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge @@ -6552,14 +6562,14 @@ class MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscription public: MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6567,7 +6577,7 @@ class MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge @@ -6600,14 +6610,14 @@ class MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionB public: MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6615,7 +6625,7 @@ class MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge @@ -6645,17 +6655,16 @@ class MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge : public MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge { public: - MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6663,7 +6672,7 @@ class MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge @@ -6696,17 +6705,16 @@ class MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge : public MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge { public: - MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6714,7 +6722,7 @@ class MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge @@ -6747,14 +6755,14 @@ class MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptio public: MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6762,7 +6770,7 @@ class MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge @@ -6795,14 +6803,14 @@ class MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscription public: MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6810,7 +6818,7 @@ class MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge @@ -6840,17 +6848,16 @@ class MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge : public MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge { public: - MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6858,7 +6865,7 @@ class MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge @@ -6894,14 +6901,14 @@ class MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscript public: MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6909,7 +6916,7 @@ class MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge @@ -6944,14 +6951,14 @@ class MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscription public: MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -6959,7 +6966,7 @@ class MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge @@ -6995,14 +7002,14 @@ class MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscripti public: MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7010,7 +7017,7 @@ class MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge @@ -7047,7 +7054,7 @@ class MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCall public: MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7055,7 +7062,7 @@ class MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCall MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7063,7 +7070,7 @@ class MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCall static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge @@ -7100,7 +7107,7 @@ class MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSub public: MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7108,7 +7115,7 @@ class MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSub MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7116,7 +7123,7 @@ class MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge @@ -7150,7 +7157,7 @@ class MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscr public: MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7158,7 +7165,7 @@ class MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscr MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7166,7 +7173,7 @@ class MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge @@ -7200,14 +7207,14 @@ class MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscri public: MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7215,7 +7222,7 @@ class MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge @@ -7248,14 +7255,14 @@ class MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionB public: MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7263,7 +7270,7 @@ class MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge @@ -7297,14 +7304,14 @@ class MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscrip public: MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7312,7 +7319,7 @@ class MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge @@ -7346,14 +7353,14 @@ class MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscript public: MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7361,7 +7368,7 @@ class MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge @@ -7394,14 +7401,14 @@ class MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBri public: MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7409,7 +7416,7 @@ class MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge @@ -7444,7 +7451,7 @@ class MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubs public: MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7452,7 +7459,7 @@ class MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubs MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7460,7 +7467,7 @@ class MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge @@ -7495,7 +7502,7 @@ class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubsc public: MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7503,7 +7510,7 @@ class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubsc MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7511,7 +7518,7 @@ class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge @@ -7544,14 +7551,14 @@ class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptio public: MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7559,7 +7566,7 @@ class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge @@ -7592,14 +7599,14 @@ class MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscription public: MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7607,7 +7614,7 @@ class MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge @@ -7640,14 +7647,14 @@ class MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionB public: MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7655,7 +7662,7 @@ class MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge @@ -7685,17 +7692,16 @@ class MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge : public MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge { public: - MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7703,7 +7709,7 @@ class MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSwitchGeneratedCommandListListAttributeCallbackBridge @@ -7736,14 +7742,14 @@ class MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRSwitchGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRSwitchGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7751,7 +7757,7 @@ class MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSwitchAcceptedCommandListListAttributeCallbackBridge @@ -7782,14 +7788,14 @@ class MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRSwitchAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRSwitchAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7797,7 +7803,7 @@ class MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRSwitchAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -7825,14 +7831,14 @@ class MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge : public MTR MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRSwitchAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRSwitchAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7840,7 +7846,7 @@ class MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge @@ -7875,7 +7881,7 @@ class MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubs public: MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7883,7 +7889,7 @@ class MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubs MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7891,7 +7897,7 @@ class MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge @@ -7926,7 +7932,7 @@ class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubsc public: MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -7934,7 +7940,7 @@ class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubsc MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7942,7 +7948,7 @@ class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge @@ -7975,14 +7981,14 @@ class MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptio public: MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7990,7 +7996,7 @@ class MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsNOCsListAttributeCallbackBridge @@ -8026,14 +8032,14 @@ class MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsNOCsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsNOCsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8041,7 +8047,7 @@ class MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsFabricsListAttributeCallbackBridge @@ -8076,14 +8082,14 @@ class MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsFabricsListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsFabricsListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8091,7 +8097,7 @@ class MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge @@ -8126,7 +8132,7 @@ class MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubsc public: MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -8134,7 +8140,7 @@ class MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubsc MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8142,7 +8148,7 @@ class MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge @@ -8176,14 +8182,14 @@ class MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscrip public: MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8191,7 +8197,7 @@ class MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge @@ -8225,14 +8231,14 @@ class MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscript public: MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8240,7 +8246,7 @@ class MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsAttributeListListAttributeCallbackBridge @@ -8273,14 +8279,14 @@ class MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBri public: MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8288,7 +8294,7 @@ class MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge @@ -8323,14 +8329,14 @@ class MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8338,7 +8344,7 @@ class MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementGroupTableListAttributeCallbackBridge @@ -8373,14 +8379,14 @@ class MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8388,7 +8394,7 @@ class MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge @@ -8421,14 +8427,14 @@ class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscription public: MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8436,7 +8442,7 @@ class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge @@ -8469,14 +8475,14 @@ class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionB public: MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8484,7 +8490,7 @@ class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementAttributeListListAttributeCallbackBridge @@ -8514,17 +8520,16 @@ class MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge : public MTRGroupKeyManagementAttributeListListAttributeCallbackBridge { public: - MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8532,7 +8537,7 @@ class MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFixedLabelLabelListListAttributeCallbackBridge : public MTRCallbackBridge @@ -8562,14 +8567,14 @@ class MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge : public MTR MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelLabelListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelLabelListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8577,7 +8582,7 @@ class MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge @@ -8610,14 +8615,14 @@ class MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8625,7 +8630,7 @@ class MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge @@ -8658,14 +8663,14 @@ class MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8673,7 +8678,7 @@ class MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFixedLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -8703,14 +8708,14 @@ class MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8718,7 +8723,7 @@ class MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUserLabelLabelListListAttributeCallbackBridge : public MTRCallbackBridge @@ -8748,14 +8753,14 @@ class MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge : public MTRU MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUserLabelLabelListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUserLabelLabelListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8763,7 +8768,7 @@ class MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge : public MTRU static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUserLabelGeneratedCommandListListAttributeCallbackBridge @@ -8796,14 +8801,14 @@ class MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8811,7 +8816,7 @@ class MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUserLabelAcceptedCommandListListAttributeCallbackBridge @@ -8844,14 +8849,14 @@ class MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8859,7 +8864,7 @@ class MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUserLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -8888,14 +8893,14 @@ class MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge : public MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUserLabelAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUserLabelAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8903,7 +8908,7 @@ class MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge @@ -8933,17 +8938,16 @@ class MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge { public: - MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8951,7 +8955,7 @@ class MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge @@ -8981,17 +8985,16 @@ class MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge { public: - MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -8999,7 +9002,7 @@ class MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBooleanStateAttributeListListAttributeCallbackBridge @@ -9030,14 +9033,14 @@ class MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBooleanStateAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9045,7 +9048,7 @@ class MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRModeSelectSupportedModesListAttributeCallbackBridge @@ -9079,14 +9082,14 @@ class MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRModeSelectSupportedModesListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRModeSelectSupportedModesListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9094,7 +9097,7 @@ class MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRModeSelectGeneratedCommandListListAttributeCallbackBridge @@ -9127,14 +9130,14 @@ class MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9142,7 +9145,7 @@ class MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRModeSelectAcceptedCommandListListAttributeCallbackBridge @@ -9175,14 +9178,14 @@ class MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9190,7 +9193,7 @@ class MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRModeSelectAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -9220,14 +9223,14 @@ class MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRModeSelectAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRModeSelectAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9235,7 +9238,7 @@ class MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockCredentialRulesSupportAttributeCallbackBridge @@ -9268,14 +9271,14 @@ class MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9283,7 +9286,7 @@ class MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockSupportedOperatingModesAttributeCallbackBridge @@ -9316,14 +9319,14 @@ class MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9331,7 +9334,7 @@ class MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge @@ -9361,17 +9364,16 @@ class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge : public MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge { public: - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9379,7 +9381,7 @@ class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge @@ -9412,14 +9414,14 @@ class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9427,7 +9429,7 @@ class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockGeneratedCommandListListAttributeCallbackBridge @@ -9460,14 +9462,14 @@ class MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9475,7 +9477,7 @@ class MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockAcceptedCommandListListAttributeCallbackBridge @@ -9508,14 +9510,14 @@ class MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9523,7 +9525,7 @@ class MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -9552,14 +9554,14 @@ class MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public M MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9567,7 +9569,7 @@ class MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringConfigStatusAttributeCallbackBridge : public MTRCallbackBridge @@ -9596,14 +9598,14 @@ class MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge : public MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9611,7 +9613,7 @@ class MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringOperationalStatusAttributeCallbackBridge @@ -9644,14 +9646,14 @@ class MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9659,7 +9661,7 @@ class MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringModeAttributeCallbackBridge : public MTRCallbackBridge @@ -9687,14 +9689,14 @@ class MTRWindowCoveringModeAttributeCallbackSubscriptionBridge : public MTRWindo MTRWindowCoveringModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9702,7 +9704,7 @@ class MTRWindowCoveringModeAttributeCallbackSubscriptionBridge : public MTRWindo static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringSafetyStatusAttributeCallbackBridge : public MTRCallbackBridge @@ -9731,14 +9733,14 @@ class MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge : public MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9746,7 +9748,7 @@ class MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge @@ -9779,14 +9781,14 @@ class MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBrid public: MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9794,7 +9796,7 @@ class MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge @@ -9824,17 +9826,16 @@ class MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridg : public MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge { public: - MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9842,7 +9843,7 @@ class MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringAttributeListListAttributeCallbackBridge @@ -9875,14 +9876,14 @@ class MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9890,7 +9891,7 @@ class MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge @@ -9923,14 +9924,14 @@ class MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBrid public: MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9938,7 +9939,7 @@ class MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge @@ -9968,17 +9969,16 @@ class MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridg : public MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -9986,7 +9986,7 @@ class MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBarrierControlAttributeListListAttributeCallbackBridge @@ -10019,14 +10019,14 @@ class MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10034,7 +10034,7 @@ class MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge @@ -10064,17 +10064,16 @@ class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridg : public MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge { public: - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10082,7 +10081,7 @@ class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge @@ -10117,7 +10116,7 @@ class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSub public: MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10125,7 +10124,7 @@ class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSub MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10133,7 +10132,7 @@ class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge @@ -10168,7 +10167,7 @@ class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubs public: MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10176,7 +10175,7 @@ class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubs MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10184,7 +10183,7 @@ class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge @@ -10218,14 +10217,14 @@ class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscripti public: MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10233,7 +10232,7 @@ class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatGeneratedCommandListListAttributeCallbackBridge @@ -10266,14 +10265,14 @@ class MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10281,7 +10280,7 @@ class MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatAcceptedCommandListListAttributeCallbackBridge @@ -10314,14 +10313,14 @@ class MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10329,7 +10328,7 @@ class MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -10359,14 +10358,14 @@ class MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10374,7 +10373,7 @@ class MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFanControlGeneratedCommandListListAttributeCallbackBridge @@ -10407,14 +10406,14 @@ class MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFanControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFanControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10422,7 +10421,7 @@ class MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFanControlAcceptedCommandListListAttributeCallbackBridge @@ -10455,14 +10454,14 @@ class MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFanControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFanControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10470,7 +10469,7 @@ class MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFanControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -10500,14 +10499,14 @@ class MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFanControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFanControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10515,7 +10514,7 @@ class MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge @@ -10549,7 +10548,7 @@ class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCa public: MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10557,7 +10556,7 @@ class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCa MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10566,7 +10565,7 @@ class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCa static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge @@ -10600,7 +10599,7 @@ class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCal public: MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10608,7 +10607,7 @@ class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCal MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10616,7 +10615,7 @@ class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCal static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge @@ -10651,7 +10650,7 @@ class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackS public: MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -10659,7 +10658,7 @@ class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackS MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10667,7 +10666,7 @@ class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackS static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlGeneratedCommandListListAttributeCallbackBridge @@ -10697,17 +10696,16 @@ class MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRColorControlGeneratedCommandListListAttributeCallbackBridge { public: - MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10715,7 +10713,7 @@ class MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlAcceptedCommandListListAttributeCallbackBridge @@ -10745,17 +10743,16 @@ class MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRColorControlAcceptedCommandListListAttributeCallbackBridge { public: - MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10763,7 +10760,7 @@ class MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlAttributeListListAttributeCallbackBridge @@ -10794,14 +10791,14 @@ class MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10809,7 +10806,7 @@ class MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge @@ -10843,14 +10840,14 @@ class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscripti public: MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10858,7 +10855,7 @@ class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge @@ -10891,14 +10888,14 @@ class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptio public: MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10906,7 +10903,7 @@ class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRBallastConfigurationAttributeListListAttributeCallbackBridge @@ -10936,17 +10933,16 @@ class MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridg : public MTRBallastConfigurationAttributeListListAttributeCallbackBridge { public: - MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRBallastConfigurationAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -10954,7 +10950,7 @@ class MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -10988,14 +10984,14 @@ class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscrip public: MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11003,7 +10999,7 @@ class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -11037,14 +11033,14 @@ class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscript public: MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11052,7 +11048,7 @@ class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge @@ -11085,14 +11081,14 @@ class MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBri public: MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11100,7 +11096,7 @@ class MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -11134,14 +11130,14 @@ class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscrip public: MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11149,7 +11145,7 @@ class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -11183,14 +11179,14 @@ class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscript public: MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11198,7 +11194,7 @@ class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge @@ -11231,14 +11227,14 @@ class MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBri public: MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11246,7 +11242,7 @@ class MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -11279,14 +11275,14 @@ class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptio public: MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11294,7 +11290,7 @@ class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -11327,14 +11323,14 @@ class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscription public: MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11342,7 +11338,7 @@ class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPressureMeasurementAttributeListListAttributeCallbackBridge @@ -11372,17 +11368,16 @@ class MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge : public MTRPressureMeasurementAttributeListListAttributeCallbackBridge { public: - MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPressureMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11390,7 +11385,7 @@ class MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -11423,14 +11418,14 @@ class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBri public: MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11438,7 +11433,7 @@ class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -11471,14 +11466,14 @@ class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBrid public: MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11486,7 +11481,7 @@ class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFlowMeasurementAttributeListListAttributeCallbackBridge @@ -11519,14 +11514,14 @@ class MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFlowMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11534,7 +11529,7 @@ class MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -11569,7 +11564,7 @@ class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSub public: MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -11577,7 +11572,7 @@ class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSub MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11585,7 +11580,7 @@ class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -11620,7 +11615,7 @@ class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubs public: MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -11628,7 +11623,7 @@ class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubs MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11636,7 +11631,7 @@ class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge @@ -11670,14 +11665,14 @@ class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscripti public: MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11685,7 +11680,7 @@ class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge @@ -11718,14 +11713,14 @@ class MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBr public: MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11733,7 +11728,7 @@ class MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge @@ -11766,14 +11761,14 @@ class MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBri public: MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11781,7 +11776,7 @@ class MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROccupancySensingAttributeListListAttributeCallbackBridge @@ -11814,14 +11809,14 @@ class MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROccupancySensingAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11829,7 +11824,7 @@ class MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge @@ -11862,14 +11857,14 @@ class MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11877,7 +11872,7 @@ class MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge @@ -11910,14 +11905,14 @@ class MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11925,7 +11920,7 @@ class MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWakeOnLanAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -11954,14 +11949,14 @@ class MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge : public MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWakeOnLanAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWakeOnLanAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -11969,7 +11964,7 @@ class MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelChannelListListAttributeCallbackBridge : public MTRCallbackBridge @@ -11999,14 +11994,14 @@ class MTRChannelChannelListListAttributeCallbackSubscriptionBridge : public MTRC MTRChannelChannelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelChannelListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelChannelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelChannelListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12014,7 +12009,7 @@ class MTRChannelChannelListListAttributeCallbackSubscriptionBridge : public MTRC static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelLineupStructAttributeCallbackBridge : public MTRCallbackBridge @@ -12044,14 +12039,14 @@ class MTRChannelLineupStructAttributeCallbackSubscriptionBridge : public MTRChan MTRChannelLineupStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelLineupStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelLineupStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelLineupStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12059,7 +12054,7 @@ class MTRChannelLineupStructAttributeCallbackSubscriptionBridge : public MTRChan static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelCurrentChannelStructAttributeCallbackBridge : public MTRCallbackBridge @@ -12091,14 +12086,14 @@ class MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelCurrentChannelStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelCurrentChannelStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12106,7 +12101,7 @@ class MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelGeneratedCommandListListAttributeCallbackBridge @@ -12139,14 +12134,14 @@ class MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12154,7 +12149,7 @@ class MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelAcceptedCommandListListAttributeCallbackBridge @@ -12187,14 +12182,14 @@ class MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12202,7 +12197,7 @@ class MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -12231,14 +12226,14 @@ class MTRChannelAttributeListListAttributeCallbackSubscriptionBridge : public MT MTRChannelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12246,7 +12241,7 @@ class MTRChannelAttributeListListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTargetNavigatorTargetListListAttributeCallbackBridge @@ -12280,14 +12275,14 @@ class MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorTargetListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorTargetListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12295,7 +12290,7 @@ class MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge @@ -12328,14 +12323,14 @@ class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBri public: MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12343,7 +12338,7 @@ class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge @@ -12376,14 +12371,14 @@ class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBrid public: MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12391,7 +12386,7 @@ class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTargetNavigatorAttributeListListAttributeCallbackBridge @@ -12424,14 +12419,14 @@ class MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12439,7 +12434,7 @@ class MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge @@ -12474,14 +12469,14 @@ class MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12489,7 +12484,7 @@ class MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge @@ -12519,17 +12514,16 @@ class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridg : public MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge { public: - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12537,7 +12531,7 @@ class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge @@ -12567,17 +12561,16 @@ class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge { public: - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12585,7 +12578,7 @@ class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackAttributeListListAttributeCallbackBridge @@ -12618,14 +12611,14 @@ class MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12633,7 +12626,7 @@ class MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaInputInputListListAttributeCallbackBridge : public MTRCallbackBridge @@ -12663,14 +12656,14 @@ class MTRMediaInputInputListListAttributeCallbackSubscriptionBridge : public MTR MTRMediaInputInputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaInputInputListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaInputInputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaInputInputListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12678,7 +12671,7 @@ class MTRMediaInputInputListListAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaInputGeneratedCommandListListAttributeCallbackBridge @@ -12711,14 +12704,14 @@ class MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12726,7 +12719,7 @@ class MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaInputAcceptedCommandListListAttributeCallbackBridge @@ -12759,14 +12752,14 @@ class MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12774,7 +12767,7 @@ class MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaInputAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -12804,14 +12797,14 @@ class MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaInputAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaInputAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12819,7 +12812,7 @@ class MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLowPowerGeneratedCommandListListAttributeCallbackBridge @@ -12852,14 +12845,14 @@ class MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12867,7 +12860,7 @@ class MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLowPowerAcceptedCommandListListAttributeCallbackBridge @@ -12900,14 +12893,14 @@ class MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12915,7 +12908,7 @@ class MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLowPowerAttributeListListAttributeCallbackBridge : public MTRCallbackBridge @@ -12944,14 +12937,14 @@ class MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge : public M MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLowPowerAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLowPowerAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -12959,7 +12952,7 @@ class MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge @@ -12989,17 +12982,16 @@ class MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge { public: - MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13007,7 +12999,7 @@ class MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge @@ -13040,14 +13032,14 @@ class MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13055,7 +13047,7 @@ class MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRKeypadInputAttributeListListAttributeCallbackBridge @@ -13086,14 +13078,14 @@ class MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13101,7 +13093,7 @@ class MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherAcceptHeaderListAttributeCallbackBridge @@ -13134,14 +13126,14 @@ class MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13149,7 +13141,7 @@ class MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge @@ -13182,14 +13174,14 @@ class MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBri public: MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13197,7 +13189,7 @@ class MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge @@ -13230,14 +13222,14 @@ class MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBrid public: MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13245,7 +13237,7 @@ class MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherAttributeListListAttributeCallbackBridge @@ -13278,14 +13270,14 @@ class MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13293,7 +13285,7 @@ class MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAudioOutputOutputListListAttributeCallbackBridge : public MTRCallbackBridge @@ -13324,14 +13316,14 @@ class MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge : public M MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputOutputListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputOutputListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13339,7 +13331,7 @@ class MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge @@ -13369,17 +13361,16 @@ class MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge { public: - MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13387,7 +13378,7 @@ class MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge @@ -13420,14 +13411,14 @@ class MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13435,7 +13426,7 @@ class MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAudioOutputAttributeListListAttributeCallbackBridge @@ -13466,14 +13457,14 @@ class MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13481,7 +13472,7 @@ class MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherCatalogListListAttributeCallbackBridge @@ -13514,14 +13505,14 @@ class MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherCatalogListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherCatalogListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13529,7 +13520,7 @@ class MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge @@ -13562,17 +13553,16 @@ class MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge : public MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge { public: - MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13580,7 +13570,7 @@ class MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge @@ -13613,14 +13603,14 @@ class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptio public: MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13628,7 +13618,7 @@ class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge @@ -13661,14 +13651,14 @@ class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscription public: MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13676,7 +13666,7 @@ class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherAttributeListListAttributeCallbackBridge @@ -13706,17 +13696,16 @@ class MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge : public MTRApplicationLauncherAttributeListListAttributeCallbackBridge { public: - MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13724,7 +13713,7 @@ class MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicApplicationStructAttributeCallbackBridge @@ -13759,14 +13748,14 @@ class MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicApplicationStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicApplicationStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13774,7 +13763,7 @@ class MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge @@ -13804,17 +13793,16 @@ class MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridg : public MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge { public: - MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13822,7 +13810,7 @@ class MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge @@ -13855,14 +13843,14 @@ class MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBr public: MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13870,7 +13858,7 @@ class MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge @@ -13903,14 +13891,14 @@ class MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBri public: MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13918,7 +13906,7 @@ class MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicAttributeListListAttributeCallbackBridge @@ -13951,14 +13939,14 @@ class MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -13966,7 +13954,7 @@ class MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge @@ -13996,17 +13984,16 @@ class MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge { public: - MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14014,7 +14001,7 @@ class MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge @@ -14044,17 +14031,16 @@ class MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge : public MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge { public: - MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14062,7 +14048,7 @@ class MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccountLoginAttributeListListAttributeCallbackBridge @@ -14093,14 +14079,14 @@ class MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccountLoginAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14108,7 +14094,7 @@ class MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge @@ -14142,14 +14128,14 @@ class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscript public: MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14157,7 +14143,7 @@ class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge @@ -14191,14 +14177,14 @@ class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscripti public: MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14206,7 +14192,7 @@ class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRElectricalMeasurementAttributeListListAttributeCallbackBridge @@ -14239,14 +14225,14 @@ class MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBrid public: MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14254,7 +14240,7 @@ class MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterBitmap8AttributeCallbackBridge : public MTRCallbackBridge @@ -14282,14 +14268,14 @@ class MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge : public MTRTestC MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap8AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap8AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14297,7 +14283,7 @@ class MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge : public MTRTestC static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterBitmap16AttributeCallbackBridge : public MTRCallbackBridge @@ -14325,14 +14311,14 @@ class MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge : public MTRTest MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap16AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap16AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14340,7 +14326,7 @@ class MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge : public MTRTest static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterBitmap32AttributeCallbackBridge : public MTRCallbackBridge @@ -14368,14 +14354,14 @@ class MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge : public MTRTest MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap32AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap32AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14383,7 +14369,7 @@ class MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge : public MTRTest static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterBitmap64AttributeCallbackBridge : public MTRCallbackBridge @@ -14411,14 +14397,14 @@ class MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge : public MTRTest MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap64AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterBitmap64AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14426,7 +14412,7 @@ class MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge : public MTRTest static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListInt8uListAttributeCallbackBridge : public MTRCallbackBridge @@ -14455,14 +14441,14 @@ class MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge : public MT MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListInt8uListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListInt8uListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14470,7 +14456,7 @@ class MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge : public MT static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListOctetStringListAttributeCallbackBridge @@ -14503,14 +14489,14 @@ class MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListOctetStringListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListOctetStringListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14518,7 +14504,7 @@ class MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListStructOctetStringListAttributeCallbackBridge @@ -14551,17 +14537,16 @@ class MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge : public MTRTestClusterListStructOctetStringListAttributeCallbackBridge { public: - MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListStructOctetStringListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListStructOctetStringListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14569,7 +14554,7 @@ class MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge @@ -14605,14 +14590,14 @@ class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscrip public: MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14620,7 +14605,7 @@ class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterStructAttrStructAttributeCallbackBridge : public MTRCallbackBridge @@ -14650,14 +14635,14 @@ class MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterStructAttrStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterStructAttrStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14665,7 +14650,7 @@ class MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListLongOctetStringListAttributeCallbackBridge @@ -14698,14 +14683,14 @@ class MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListLongOctetStringListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListLongOctetStringListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14713,7 +14698,7 @@ class MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterListFabricScopedListAttributeCallbackBridge @@ -14749,14 +14734,14 @@ class MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListFabricScopedListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterListFabricScopedListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14764,7 +14749,7 @@ class MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterNullableBitmap8AttributeCallbackBridge : public MTRCallbackBridge @@ -14795,14 +14780,14 @@ class MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge : public MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap8AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap8AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14810,7 +14795,7 @@ class MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterNullableBitmap16AttributeCallbackBridge : public MTRCallbackBridge @@ -14842,14 +14827,14 @@ class MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap16AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap16AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14857,7 +14842,7 @@ class MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterNullableBitmap32AttributeCallbackBridge : public MTRCallbackBridge @@ -14889,14 +14874,14 @@ class MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap32AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap32AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14904,7 +14889,7 @@ class MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterNullableBitmap64AttributeCallbackBridge : public MTRCallbackBridge @@ -14936,14 +14921,14 @@ class MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap64AttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableBitmap64AttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -14951,7 +14936,7 @@ class MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterNullableStructStructAttributeCallbackBridge @@ -14986,14 +14971,14 @@ class MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableStructStructAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterNullableStructStructAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -15001,7 +14986,7 @@ class MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterGeneratedCommandListListAttributeCallbackBridge @@ -15031,17 +15016,16 @@ class MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRTestClusterGeneratedCommandListListAttributeCallbackBridge { public: - MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -15049,7 +15033,7 @@ class MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterAcceptedCommandListListAttributeCallbackBridge @@ -15082,14 +15066,14 @@ class MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -15097,7 +15081,7 @@ class MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterAttributeListListAttributeCallbackBridge @@ -15128,14 +15112,14 @@ class MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterAttributeListListAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterAttributeListListAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -15143,7 +15127,7 @@ class MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupsClusterAddGroupResponseCallbackBridge : public MTRCallbackBridge @@ -16446,14 +16430,14 @@ class MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBri public: MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16461,7 +16445,7 @@ class MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge @@ -16496,14 +16480,14 @@ class MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscri public: MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16511,7 +16495,7 @@ class MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge @@ -16541,17 +16525,16 @@ class MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge : public MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge { public: - MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16559,7 +16542,7 @@ class MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge @@ -16594,14 +16577,14 @@ class MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscripti public: MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16609,7 +16592,7 @@ class MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge @@ -16639,17 +16622,16 @@ class MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge : public MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge { public: - MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16657,7 +16639,7 @@ class MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge @@ -16691,14 +16673,14 @@ class MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptio public: MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16706,7 +16688,7 @@ class MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge @@ -16739,14 +16721,14 @@ class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptio public: MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16754,7 +16736,7 @@ class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge @@ -16791,7 +16773,7 @@ class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSub public: MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -16799,7 +16781,7 @@ class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSub MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16807,7 +16789,7 @@ class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge @@ -16840,14 +16822,14 @@ class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBr public: MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16855,7 +16837,7 @@ class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge @@ -16890,7 +16872,7 @@ class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscr public: MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -16898,7 +16880,7 @@ class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscr MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16906,7 +16888,7 @@ class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge @@ -16939,14 +16921,14 @@ class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -16954,7 +16936,7 @@ class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge @@ -16988,14 +16970,14 @@ class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionB public: MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17003,7 +16985,7 @@ class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge @@ -17034,14 +17016,14 @@ class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17049,7 +17031,7 @@ class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge @@ -17080,17 +17062,16 @@ class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridg : public MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge { public: - MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17098,7 +17079,7 @@ class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLevelControlClusterMoveModeAttributeCallbackBridge : public MTRCallbackBridge @@ -17128,14 +17109,14 @@ class MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLevelControlClusterMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLevelControlClusterMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17143,7 +17124,7 @@ class MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge @@ -17174,17 +17155,16 @@ class MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge : public MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge { public: - MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17192,7 +17172,7 @@ class MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRLevelControlClusterStepModeAttributeCallbackBridge : public MTRCallbackBridge @@ -17222,14 +17202,14 @@ class MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLevelControlClusterStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRLevelControlClusterStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17237,7 +17217,7 @@ class MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableLevelControlClusterStepModeAttributeCallbackBridge @@ -17268,17 +17248,16 @@ class MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge : public MTRNullableLevelControlClusterStepModeAttributeCallbackBridge { public: - MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17286,7 +17265,7 @@ class MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlClusterAuthModeAttributeCallbackBridge @@ -17317,14 +17296,14 @@ class MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterAuthModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterAuthModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17332,7 +17311,7 @@ class MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge @@ -17363,17 +17342,16 @@ class MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge : public MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge { public: - MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17381,7 +17359,7 @@ class MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge @@ -17414,14 +17392,14 @@ class MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17429,7 +17407,7 @@ class MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge @@ -17463,14 +17441,14 @@ class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscription public: MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17478,7 +17456,7 @@ class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAccessControlClusterPrivilegeAttributeCallbackBridge @@ -17509,14 +17487,14 @@ class MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterPrivilegeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAccessControlClusterPrivilegeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17524,7 +17502,7 @@ class MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge @@ -17555,17 +17533,16 @@ class MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridg : public MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge { public: - MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17573,7 +17550,7 @@ class MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsClusterActionErrorEnumAttributeCallbackBridge @@ -17604,14 +17581,14 @@ class MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionErrorEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionErrorEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17619,7 +17596,7 @@ class MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge @@ -17650,17 +17627,16 @@ class MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridg : public MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge { public: - MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17668,7 +17644,7 @@ class MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsClusterActionStateEnumAttributeCallbackBridge @@ -17699,14 +17675,14 @@ class MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17714,7 +17690,7 @@ class MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge @@ -17745,17 +17721,16 @@ class MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridg : public MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge { public: - MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17763,7 +17738,7 @@ class MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsClusterActionTypeEnumAttributeCallbackBridge @@ -17794,14 +17769,14 @@ class MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterActionTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17809,7 +17784,7 @@ class MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge @@ -17840,17 +17815,16 @@ class MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge : public MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge { public: - MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17858,7 +17832,7 @@ class MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge @@ -17891,14 +17865,14 @@ class MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17906,7 +17880,7 @@ class MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge @@ -17940,14 +17914,14 @@ class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscription public: MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -17955,7 +17929,7 @@ class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge @@ -17990,7 +17964,7 @@ class MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSu public: MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -17998,7 +17972,7 @@ class MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSu MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18006,7 +17980,7 @@ class MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge @@ -18042,7 +18016,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCa public: MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18050,7 +18024,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCa MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18059,7 +18033,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCa static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge @@ -18094,7 +18068,7 @@ class MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSub public: MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18102,7 +18076,7 @@ class MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSub MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18110,7 +18084,7 @@ class MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge @@ -18146,7 +18120,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCal public: MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18154,7 +18128,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCal MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18162,7 +18136,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCal static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge @@ -18196,14 +18170,14 @@ class MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscrip public: MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18211,7 +18185,7 @@ class MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge @@ -18249,7 +18223,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallback public: MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18257,7 +18231,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallback MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18265,7 +18239,7 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallback static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge @@ -18301,7 +18275,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallback public: MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18309,7 +18283,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallback MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18317,7 +18291,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallback static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge @@ -18353,7 +18327,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttribute public: MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18361,7 +18335,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttribute MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18370,7 +18344,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttribute static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge @@ -18405,7 +18379,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSu public: MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18413,7 +18387,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSu MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18421,7 +18395,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge @@ -18457,7 +18431,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCa public: MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18465,7 +18439,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCa MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18474,7 +18448,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCa static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge @@ -18509,7 +18483,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSub public: MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18517,7 +18491,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSub MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18525,7 +18499,7 @@ class MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge @@ -18561,7 +18535,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCal public: MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18569,7 +18543,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCal MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18577,7 +18551,7 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCal static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge @@ -18610,14 +18584,14 @@ class MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionB public: MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18625,7 +18599,7 @@ class MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge @@ -18662,7 +18636,7 @@ class MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubsc public: MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -18670,7 +18644,7 @@ class MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubsc MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18678,7 +18652,7 @@ class MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge @@ -18711,14 +18685,14 @@ class MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBri public: MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18726,7 +18700,7 @@ class MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge @@ -18761,14 +18735,14 @@ class MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscri public: MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18776,7 +18750,7 @@ class MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge @@ -18809,14 +18783,14 @@ class MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18824,7 +18798,7 @@ class MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge @@ -18858,14 +18832,14 @@ class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBri public: MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18873,7 +18847,7 @@ class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge @@ -18906,14 +18880,14 @@ class MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18921,7 +18895,7 @@ class MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge @@ -18955,14 +18929,14 @@ class MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBr public: MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -18970,7 +18944,7 @@ class MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge @@ -19003,14 +18977,14 @@ class MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19018,7 +18992,7 @@ class MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge @@ -19052,14 +19026,14 @@ class MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBr public: MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19067,7 +19041,7 @@ class MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge @@ -19100,14 +19074,14 @@ class MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19115,7 +19089,7 @@ class MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge @@ -19149,14 +19123,14 @@ class MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBr public: MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19164,7 +19138,7 @@ class MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterBatFaultAttributeCallbackBridge : public MTRCallbackBridge @@ -19193,14 +19167,14 @@ class MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge : public MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19208,7 +19182,7 @@ class MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge @@ -19242,14 +19216,14 @@ class MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19257,7 +19231,7 @@ class MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge @@ -19287,17 +19261,16 @@ class MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge : public MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge { public: - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19305,7 +19278,7 @@ class MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge @@ -19339,14 +19312,14 @@ class MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptio public: MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19354,7 +19327,7 @@ class MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge @@ -19384,17 +19357,16 @@ class MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge : public MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge { public: - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19402,7 +19374,7 @@ class MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge @@ -19436,14 +19408,14 @@ class MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptio public: MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19451,7 +19423,7 @@ class MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge @@ -19484,14 +19456,14 @@ class MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19499,7 +19471,7 @@ class MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge @@ -19533,14 +19505,14 @@ class MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscription public: MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19548,7 +19520,7 @@ class MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPowerSourceClusterWiredFaultAttributeCallbackBridge @@ -19579,14 +19551,14 @@ class MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19594,7 +19566,7 @@ class MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge @@ -19625,17 +19597,16 @@ class MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge : public MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge { public: - MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19643,7 +19614,7 @@ class MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge @@ -19677,14 +19648,14 @@ class MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscript public: MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19692,7 +19663,7 @@ class MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge @@ -19729,7 +19700,7 @@ class MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackS public: MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19737,7 +19708,7 @@ class MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackS MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19745,7 +19716,7 @@ class MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackS static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge @@ -19780,7 +19751,7 @@ class MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubsc public: MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19788,7 +19759,7 @@ class MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubsc MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19796,7 +19767,7 @@ class MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge @@ -19834,7 +19805,7 @@ class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallb public: MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19842,7 +19813,7 @@ class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallb MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19850,7 +19821,7 @@ class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallb static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge @@ -19885,7 +19856,7 @@ class MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackS public: MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19893,7 +19864,7 @@ class MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackS MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -19901,7 +19872,7 @@ class MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackS static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge @@ -19937,7 +19908,7 @@ class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeC public: MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19945,7 +19916,7 @@ class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeC MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -19954,7 +19925,7 @@ class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeC static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge @@ -19984,17 +19955,16 @@ class MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge : public MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge { public: - MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20002,7 +19972,7 @@ class MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge @@ -20036,14 +20006,14 @@ class MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptio public: MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20051,7 +20021,7 @@ class MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge @@ -20084,14 +20054,14 @@ class MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20099,7 +20069,7 @@ class MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge @@ -20133,14 +20103,14 @@ class MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBri public: MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20148,7 +20118,7 @@ class MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge @@ -20181,14 +20151,14 @@ class MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20196,7 +20166,7 @@ class MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge @@ -20230,14 +20200,14 @@ class MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBri public: MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20245,7 +20215,7 @@ class MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge @@ -20278,14 +20248,14 @@ class MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionB public: MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20293,7 +20263,7 @@ class MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge @@ -20330,7 +20300,7 @@ class MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubsc public: MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -20338,7 +20308,7 @@ class MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubsc MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20346,7 +20316,7 @@ class MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge @@ -20379,14 +20349,14 @@ class MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBri public: MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20394,7 +20364,7 @@ class MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge @@ -20429,14 +20399,14 @@ class MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscri public: MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20444,7 +20414,7 @@ class MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge @@ -20477,14 +20447,14 @@ class MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscription public: MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20492,7 +20462,7 @@ class MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge @@ -20529,7 +20499,7 @@ class MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubs public: MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -20537,7 +20507,7 @@ class MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubs MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20545,7 +20515,7 @@ class MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge @@ -20578,14 +20548,14 @@ class MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBrid public: MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20593,7 +20563,7 @@ class MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge @@ -20628,14 +20598,14 @@ class MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscrip public: MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20643,7 +20613,7 @@ class MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge @@ -20676,14 +20646,14 @@ class MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionB public: MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20691,7 +20661,7 @@ class MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge @@ -20728,7 +20698,7 @@ class MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubsc public: MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -20736,7 +20706,7 @@ class MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubsc MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20744,7 +20714,7 @@ class MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge @@ -20777,14 +20747,14 @@ class MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBri public: MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20792,7 +20762,7 @@ class MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge @@ -20827,14 +20797,14 @@ class MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscri public: MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20842,7 +20812,7 @@ class MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge @@ -20875,14 +20845,14 @@ class MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptio public: MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20890,7 +20860,7 @@ class MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge @@ -20927,7 +20897,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSub public: MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -20935,7 +20905,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSub MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20943,7 +20913,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge @@ -20976,14 +20946,14 @@ class MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscription public: MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -20991,7 +20961,7 @@ class MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge @@ -21028,7 +20998,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubs public: MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21036,7 +21006,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubs MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21044,7 +21014,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge @@ -21079,7 +21049,7 @@ class MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackS public: MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21087,7 +21057,7 @@ class MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackS MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21095,7 +21065,7 @@ class MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackS static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge @@ -21131,7 +21101,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeC public: MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21139,7 +21109,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeC MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21148,7 +21118,7 @@ class MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeC static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge @@ -21183,7 +21153,7 @@ class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSu public: MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21191,7 +21161,7 @@ class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSu MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21199,7 +21169,7 @@ class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge @@ -21235,7 +21205,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCa public: MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21243,7 +21213,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCa MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21252,7 +21222,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCa static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge @@ -21285,14 +21255,14 @@ class MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionB public: MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21300,7 +21270,7 @@ class MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge @@ -21337,7 +21307,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubsc public: MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21345,7 +21315,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubsc MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21353,7 +21323,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge @@ -21388,7 +21358,7 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubsc public: MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21396,7 +21366,7 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubsc MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21404,7 +21374,7 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge @@ -21442,7 +21412,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallb public: MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21450,7 +21420,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallb MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21458,7 +21428,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallb static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge @@ -21492,14 +21462,14 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscripti public: MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21507,7 +21477,7 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge @@ -21544,7 +21514,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSu public: MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21552,7 +21522,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSu MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21560,7 +21530,7 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge @@ -21594,14 +21564,14 @@ class MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscripti public: MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21609,7 +21579,7 @@ class MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge @@ -21646,7 +21616,7 @@ class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSu public: MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21654,7 +21624,7 @@ class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSu MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21662,7 +21632,7 @@ class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge @@ -21695,14 +21665,14 @@ class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionB public: MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21710,7 +21680,7 @@ class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge @@ -21747,7 +21717,7 @@ class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubsc public: MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21755,7 +21725,7 @@ class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubsc MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21763,7 +21733,7 @@ class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge @@ -21796,14 +21766,14 @@ class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBr public: MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21811,7 +21781,7 @@ class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge @@ -21846,7 +21816,7 @@ class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscr public: MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21854,7 +21824,7 @@ class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscr MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21862,7 +21832,7 @@ class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge @@ -21896,7 +21866,7 @@ class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCall public: MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21904,7 +21874,7 @@ class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCall MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -21912,7 +21882,7 @@ class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCall static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge @@ -21948,7 +21918,7 @@ class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttri public: MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21956,7 +21926,7 @@ class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttri MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -21965,7 +21935,7 @@ class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge @@ -21998,14 +21968,14 @@ class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptio public: MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22013,7 +21983,7 @@ class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge @@ -22050,7 +22020,7 @@ class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSub public: MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -22058,7 +22028,7 @@ class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSub MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22066,7 +22036,7 @@ class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge @@ -22101,7 +22071,7 @@ class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubs public: MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -22109,7 +22079,7 @@ class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubs MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22117,7 +22087,7 @@ class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge @@ -22153,7 +22123,7 @@ class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCall public: MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -22161,7 +22131,7 @@ class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCall MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22169,7 +22139,7 @@ class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCall static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge @@ -22203,14 +22173,14 @@ class MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscri public: MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22218,7 +22188,7 @@ class MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge @@ -22256,7 +22226,7 @@ class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbac public: MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -22264,7 +22234,7 @@ class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbac MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22272,7 +22242,7 @@ class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbac static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge : public MTRCallbackBridge @@ -22301,14 +22271,14 @@ class MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22316,7 +22286,7 @@ class MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge @@ -22350,14 +22320,14 @@ class MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22365,7 +22335,7 @@ class MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge @@ -22398,14 +22368,14 @@ class MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22413,7 +22383,7 @@ class MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge @@ -22447,14 +22417,14 @@ class MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBri public: MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22462,7 +22432,7 @@ class MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge @@ -22495,14 +22465,14 @@ class MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22510,7 +22480,7 @@ class MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge @@ -22544,14 +22514,14 @@ class MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBri public: MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22559,7 +22529,7 @@ class MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge @@ -22592,14 +22562,14 @@ class MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22607,7 +22577,7 @@ class MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge @@ -22641,14 +22611,14 @@ class MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscription public: MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22656,7 +22626,7 @@ class MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlDoorStateAttributeCallbackBridge : public MTRCallbackBridge @@ -22685,14 +22655,14 @@ class MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22700,7 +22670,7 @@ class MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge @@ -22734,14 +22704,14 @@ class MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22749,7 +22719,7 @@ class MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge @@ -22780,14 +22750,14 @@ class MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22795,7 +22765,7 @@ class MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge @@ -22826,17 +22796,16 @@ class MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridg : public MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22844,7 +22813,7 @@ class MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge @@ -22877,14 +22846,14 @@ class MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22892,7 +22861,7 @@ class MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge @@ -22926,14 +22895,14 @@ class MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscription public: MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22941,7 +22910,7 @@ class MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlLockStateAttributeCallbackBridge : public MTRCallbackBridge @@ -22970,14 +22939,14 @@ class MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -22985,7 +22954,7 @@ class MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge : public static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge @@ -23019,14 +22988,14 @@ class MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23034,7 +23003,7 @@ class MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlLockTypeAttributeCallbackBridge : public MTRCallbackBridge @@ -23063,14 +23032,14 @@ class MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge : public M MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23078,7 +23047,7 @@ class MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge @@ -23112,14 +23081,14 @@ class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23127,7 +23096,7 @@ class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge @@ -23160,14 +23129,14 @@ class MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23175,7 +23144,7 @@ class MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge @@ -23209,14 +23178,14 @@ class MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBrid public: MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23224,7 +23193,7 @@ class MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge @@ -23257,14 +23226,14 @@ class MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23272,7 +23241,7 @@ class MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge @@ -23306,14 +23275,14 @@ class MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBri public: MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23321,7 +23290,7 @@ class MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge @@ -23354,14 +23323,14 @@ class MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23369,7 +23338,7 @@ class MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge @@ -23403,14 +23372,14 @@ class MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBr public: MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23418,7 +23387,7 @@ class MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlStatusAttributeCallbackBridge : public MTRCallbackBridge @@ -23446,14 +23415,14 @@ class MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge : public MTR MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23461,7 +23430,7 @@ class MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge : public MTR static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge @@ -23494,14 +23463,14 @@ class MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23509,7 +23478,7 @@ class MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlUserStatusAttributeCallbackBridge : public MTRCallbackBridge @@ -23539,14 +23508,14 @@ class MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23554,7 +23523,7 @@ class MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge @@ -23585,17 +23554,16 @@ class MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge : public MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge { public: - MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23603,7 +23571,7 @@ class MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDlUserTypeAttributeCallbackBridge : public MTRCallbackBridge @@ -23632,14 +23600,14 @@ class MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge : public M MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23647,7 +23615,7 @@ class MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge @@ -23681,14 +23649,14 @@ class MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23696,7 +23664,7 @@ class MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge @@ -23729,14 +23697,14 @@ class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionB public: MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23744,7 +23712,7 @@ class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge @@ -23781,7 +23749,7 @@ class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubsc public: MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -23789,7 +23757,7 @@ class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubsc MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23797,7 +23765,7 @@ class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge @@ -23830,14 +23798,14 @@ class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptio public: MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23845,7 +23813,7 @@ class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge @@ -23882,7 +23850,7 @@ class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSub public: MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -23890,7 +23858,7 @@ class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSub MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23898,7 +23866,7 @@ class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge @@ -23931,14 +23899,14 @@ class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBri public: MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23946,7 +23914,7 @@ class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge @@ -23981,14 +23949,14 @@ class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscri public: MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -23996,7 +23964,7 @@ class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge @@ -24029,14 +23997,14 @@ class MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24044,7 +24012,7 @@ class MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge @@ -24078,14 +24046,14 @@ class MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionB public: MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24093,7 +24061,7 @@ class MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionB static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge @@ -24126,14 +24094,14 @@ class MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24141,7 +24109,7 @@ class MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge @@ -24175,14 +24143,14 @@ class MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBri public: MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24190,7 +24158,7 @@ class MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge @@ -24220,17 +24188,16 @@ class MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge : public MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge { public: - MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24238,7 +24205,7 @@ class MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge @@ -24272,14 +24239,14 @@ class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptio public: MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24287,7 +24254,7 @@ class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRWindowCoveringClusterTypeAttributeCallbackBridge : public MTRCallbackBridge @@ -24316,14 +24283,14 @@ class MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge : public M MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24331,7 +24298,7 @@ class MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge : public M static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge @@ -24365,14 +24332,14 @@ class MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24380,7 +24347,7 @@ class MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge @@ -24415,7 +24382,7 @@ class MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubsc public: MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -24423,7 +24390,7 @@ class MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubsc MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24431,7 +24398,7 @@ class MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubsc static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge @@ -24469,7 +24436,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallb public: MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -24477,7 +24444,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallb MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24485,7 +24452,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallb static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge @@ -24520,7 +24487,7 @@ class MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSub public: MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -24528,7 +24495,7 @@ class MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSub MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24536,7 +24503,7 @@ class MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge @@ -24572,7 +24539,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCal public: MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -24580,7 +24547,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCal MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24588,7 +24555,7 @@ class MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCal static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge @@ -24618,17 +24585,16 @@ class MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge : public MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge { public: - MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24636,7 +24602,7 @@ class MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge @@ -24670,14 +24636,14 @@ class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptio public: MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24685,7 +24651,7 @@ class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge @@ -24718,14 +24684,14 @@ class MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscription public: MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24733,7 +24699,7 @@ class MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge @@ -24770,7 +24736,7 @@ class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubs public: MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -24778,7 +24744,7 @@ class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubs MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24786,7 +24752,7 @@ class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubs static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge @@ -24819,14 +24785,14 @@ class MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBrid public: MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24834,7 +24800,7 @@ class MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge @@ -24869,14 +24835,14 @@ class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscrip public: MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24884,7 +24850,7 @@ class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscrip static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge @@ -24914,17 +24880,16 @@ class MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridg : public MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge { public: - MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24932,7 +24897,7 @@ class MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge @@ -24967,14 +24932,14 @@ class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscript public: MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -24982,7 +24947,7 @@ class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge @@ -25012,17 +24977,16 @@ class MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge : public MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge { public: - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25030,7 +24994,7 @@ class MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge @@ -25065,14 +25029,14 @@ class MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscripti public: MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25080,7 +25044,7 @@ class MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFanControlClusterFanModeTypeAttributeCallbackBridge @@ -25111,14 +25075,14 @@ class MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFanControlClusterFanModeTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFanControlClusterFanModeTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25126,7 +25090,7 @@ class MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge @@ -25157,17 +25121,16 @@ class MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge : public MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge { public: - MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25175,7 +25138,7 @@ class MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterColorLoopActionAttributeCallbackBridge @@ -25208,14 +25171,14 @@ class MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorLoopActionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorLoopActionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25223,7 +25186,7 @@ class MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge @@ -25257,14 +25220,14 @@ class MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscription public: MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25272,7 +25235,7 @@ class MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscription static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge @@ -25302,17 +25265,16 @@ class MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridg : public MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge { public: - MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25320,7 +25282,7 @@ class MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge @@ -25355,14 +25317,14 @@ class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscript public: MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25370,7 +25332,7 @@ class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterColorModeAttributeCallbackBridge @@ -25401,14 +25363,14 @@ class MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterColorModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25416,7 +25378,7 @@ class MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterColorModeAttributeCallbackBridge @@ -25447,17 +25409,16 @@ class MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge : public MTRNullableColorControlClusterColorModeAttributeCallbackBridge { public: - MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterColorModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25465,7 +25426,7 @@ class MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterHueDirectionAttributeCallbackBridge @@ -25498,14 +25459,14 @@ class MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueDirectionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueDirectionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25513,7 +25474,7 @@ class MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge @@ -25547,14 +25508,14 @@ class MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBri public: MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25562,7 +25523,7 @@ class MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterHueMoveModeAttributeCallbackBridge @@ -25595,14 +25556,14 @@ class MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25610,7 +25571,7 @@ class MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge @@ -25644,14 +25605,14 @@ class MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBrid public: MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25659,7 +25620,7 @@ class MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterHueStepModeAttributeCallbackBridge @@ -25692,14 +25653,14 @@ class MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterHueStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25707,7 +25668,7 @@ class MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge @@ -25741,14 +25702,14 @@ class MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBrid public: MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25756,7 +25717,7 @@ class MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge @@ -25786,17 +25747,16 @@ class MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridg : public MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge { public: - MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25804,7 +25764,7 @@ class MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge @@ -25839,14 +25799,14 @@ class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscript public: MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25854,7 +25814,7 @@ class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRColorControlClusterSaturationStepModeAttributeCallbackBridge @@ -25884,17 +25844,16 @@ class MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridg : public MTRColorControlClusterSaturationStepModeAttributeCallbackBridge { public: - MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25902,7 +25861,7 @@ class MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge @@ -25937,14 +25896,14 @@ class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscript public: MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -25952,7 +25911,7 @@ class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge @@ -25986,14 +25945,14 @@ class MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscripti public: MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26001,7 +25960,7 @@ class MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge @@ -26038,7 +25997,7 @@ class MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSu public: MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -26046,7 +26005,7 @@ class MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSu MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26054,7 +26013,7 @@ class MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelClusterChannelStatusEnumAttributeCallbackBridge @@ -26087,14 +26046,14 @@ class MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26102,7 +26061,7 @@ class MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge @@ -26136,14 +26095,14 @@ class MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBri public: MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26151,7 +26110,7 @@ class MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge @@ -26184,14 +26143,14 @@ class MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26199,7 +26158,7 @@ class MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge @@ -26233,14 +26192,14 @@ class MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBr public: MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26248,7 +26207,7 @@ class MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge @@ -26282,14 +26241,14 @@ class MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscri public: MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26297,7 +26256,7 @@ class MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge @@ -26335,7 +26294,7 @@ class MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbac public: MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -26343,7 +26302,7 @@ class MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbac MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26351,7 +26310,7 @@ class MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbac static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge @@ -26384,14 +26343,14 @@ class MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptio public: MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26399,7 +26358,7 @@ class MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge @@ -26436,7 +26395,7 @@ class MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSub public: MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -26444,7 +26403,7 @@ class MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSub MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26452,7 +26411,7 @@ class MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSub static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge @@ -26482,17 +26441,16 @@ class MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridg : public MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge { public: - MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26500,7 +26458,7 @@ class MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridg static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge @@ -26535,14 +26493,14 @@ class MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscript public: MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26550,7 +26508,7 @@ class MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge @@ -26583,14 +26541,14 @@ class MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26598,7 +26556,7 @@ class MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge @@ -26632,14 +26590,14 @@ class MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBrid public: MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26647,7 +26605,7 @@ class MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge @@ -26678,14 +26636,14 @@ class MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26693,7 +26651,7 @@ class MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge @@ -26724,17 +26682,16 @@ class MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge : public MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge { public: - MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26742,7 +26699,7 @@ class MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge @@ -26775,14 +26732,14 @@ class MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBri public: MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26790,7 +26747,7 @@ class MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge @@ -26825,14 +26782,14 @@ class MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscri public: MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26840,7 +26797,7 @@ class MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscri static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge @@ -26874,14 +26831,14 @@ class MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscript public: MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26889,7 +26846,7 @@ class MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscript static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge @@ -26926,7 +26883,7 @@ class MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackS public: MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -26934,7 +26891,7 @@ class MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackS MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26942,7 +26899,7 @@ class MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackS static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge @@ -26972,17 +26929,16 @@ class MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge : public MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge { public: - MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -26990,7 +26946,7 @@ class MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge @@ -27025,14 +26981,14 @@ class MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscripti public: MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27040,7 +26996,7 @@ class MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRContentLauncherClusterParameterEnumAttributeCallbackBridge @@ -27070,17 +27026,16 @@ class MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge : public MTRContentLauncherClusterParameterEnumAttributeCallbackBridge { public: - MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27088,7 +27043,7 @@ class MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge @@ -27122,14 +27077,14 @@ class MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptio public: MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27137,7 +27092,7 @@ class MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptio static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge @@ -27170,14 +27125,14 @@ class MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27185,7 +27140,7 @@ class MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge @@ -27219,14 +27174,14 @@ class MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBr public: MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27234,7 +27189,7 @@ class MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBr static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge @@ -27270,7 +27225,7 @@ class MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbac public: MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -27278,7 +27233,7 @@ class MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbac MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27286,7 +27241,7 @@ class MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbac static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge @@ -27322,7 +27277,7 @@ class MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttribut public: MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -27330,7 +27285,7 @@ class MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttribut MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) @@ -27339,7 +27294,7 @@ class MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttribut static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge @@ -27373,14 +27328,14 @@ class MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscripti public: MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27388,7 +27343,7 @@ class MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscripti static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge @@ -27425,7 +27380,7 @@ class MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSu public: MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) @@ -27433,7 +27388,7 @@ class MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSu MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27441,7 +27396,7 @@ class MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSu static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRTestClusterClusterSimpleEnumAttributeCallbackBridge @@ -27472,14 +27427,14 @@ class MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27487,7 +27442,7 @@ class MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge @@ -27518,17 +27473,16 @@ class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge : public MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge { public: - MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, - MTRDeviceController * controller, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} - MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, - ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27536,7 +27490,7 @@ class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge @@ -27569,14 +27523,14 @@ class MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27584,7 +27538,7 @@ class MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; class MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge @@ -27618,14 +27572,14 @@ class MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBrid public: MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, chip::NodeId nodeID, MTRDeviceController * controller, ResponseHandler handler, - MTRActionBlock action, SubscriptionEstablishedHandler establishedHandler) : + MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, nodeID, controller, handler, action, true), mEstablishedHandler(establishedHandler) {} MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, MTRBaseDevice * device, ResponseHandler handler, MTRActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : + MTRSubscriptionEstablishedHandler establishedHandler) : MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, device, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -27633,5 +27587,5 @@ class MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBrid static void OnSubscriptionEstablished(void * context); private: - SubscriptionEstablishedHandler mEstablishedHandler; + MTRSubscriptionEstablishedHandler mEstablishedHandler; }; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index a9c79f890e8ca5..17a79c6c72c9f8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -34,16 +34,16 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeIdentifyTimeWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)dataValueDictionary @@ -77,39 +77,39 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)removeAllGroupsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params; @@ -136,57 +136,57 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeSceneCountWithParams:(MTRReadParams * _Nullable)params; @@ -223,44 +223,44 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)offWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)onWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)toggleWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)onWithRecallGlobalSceneWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeOnOffWithParams:(MTRReadParams * _Nullable)params; @@ -310,7 +310,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params; @@ -344,44 +344,44 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params; @@ -469,7 +469,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary @@ -543,7 +543,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeDeviceListWithParams:(MTRReadParams * _Nullable)params; @@ -576,7 +576,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValueDictionary @@ -611,7 +611,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeAclWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeAclWithValue:(NSDictionary *)dataValueDictionary @@ -656,56 +656,56 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeActionListWithParams:(MTRReadParams * _Nullable)params; @@ -738,15 +738,15 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)mfgSpecificPingWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeDataModelRevisionWithParams:(MTRReadParams * _Nullable)params; @@ -826,22 +826,22 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; @@ -866,12 +866,12 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeDefaultOtaProvidersWithValue:(NSDictionary *)dataValueDictionary @@ -912,7 +912,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeActiveLocaleWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)dataValueDictionary @@ -949,7 +949,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeHourFormatWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeHourFormatWithValue:(NSDictionary *)dataValueDictionary @@ -993,7 +993,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeTemperatureUnitWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)dataValueDictionary @@ -1025,7 +1025,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeSourcesWithParams:(MTRReadParams * _Nullable)params; @@ -1053,7 +1053,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeStatusWithParams:(MTRReadParams * _Nullable)params; @@ -1140,29 +1140,30 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)commissioningCompleteWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion: + (void (^)( + MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeBreadcrumbWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataValueDictionary @@ -1202,38 +1203,38 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeMaxNetworksWithParams:(MTRReadParams * _Nullable)params; @@ -1279,13 +1280,13 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; @@ -1311,12 +1312,12 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeNetworkInterfacesWithParams:(MTRReadParams * _Nullable)params; @@ -1360,15 +1361,15 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)resetWatermarksWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeThreadMetricsWithParams:(MTRReadParams * _Nullable)params; @@ -1402,15 +1403,15 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeChannelWithParams:(MTRReadParams * _Nullable)params; @@ -1562,15 +1563,15 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeBssidWithParams:(MTRReadParams * _Nullable)params; @@ -1622,15 +1623,15 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributePHYRateWithParams:(MTRReadParams * _Nullable)params; @@ -1676,7 +1677,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params; @@ -1741,7 +1742,7 @@ light or a window shade. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeNumberOfPositionsWithParams:(MTRReadParams * _Nullable)params; @@ -1772,23 +1773,23 @@ light or a window shade. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)revokeCommissioningWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeWindowStatusWithParams:(MTRReadParams * _Nullable)params; @@ -1820,47 +1821,47 @@ light or a window shade. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params; @@ -1897,26 +1898,26 @@ light or a window shade. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataValueDictionary @@ -1955,7 +1956,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params; @@ -1982,7 +1983,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataValueDictionary @@ -2014,7 +2015,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeStateValueWithParams:(MTRReadParams * _Nullable)params; @@ -2041,12 +2042,12 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params; @@ -2093,86 +2094,86 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_NEWLY_AVAILABLE; - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeLockStateWithParams:(MTRReadParams * _Nullable)params; @@ -2359,45 +2360,45 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)upOrOpenWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)downOrCloseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stopMotionWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeTypeWithParams:(MTRReadParams * _Nullable)params; @@ -2471,19 +2472,19 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)barrierControlStopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params; @@ -2558,7 +2559,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeMaxPressureWithParams:(MTRReadParams * _Nullable)params; @@ -2649,28 +2650,28 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)clearWeeklyScheduleWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params; @@ -2928,7 +2929,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeFanModeWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeFanModeWithValue:(NSDictionary *)dataValueDictionary @@ -3005,7 +3006,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeTemperatureDisplayModeWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeTemperatureDisplayModeWithValue:(NSDictionary *)dataValueDictionary @@ -3051,84 +3052,84 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeCurrentHueWithParams:(MTRReadParams * _Nullable)params; @@ -3322,7 +3323,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributePhysicalMinLevelWithParams:(MTRReadParams * _Nullable)params; @@ -3425,7 +3426,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3460,7 +3461,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3493,7 +3494,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3536,7 +3537,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3569,7 +3570,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeMeasuredValueWithParams:(MTRReadParams * _Nullable)params; @@ -3602,7 +3603,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeOccupancyWithParams:(MTRReadParams * _Nullable)params; @@ -3697,7 +3698,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeMACAddressWithParams:(MTRReadParams * _Nullable)params; @@ -3724,21 +3725,21 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeChannelListWithParams:(MTRReadParams * _Nullable)params; @@ -3769,13 +3770,13 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeTargetListWithParams:(MTRReadParams * _Nullable)params; @@ -3805,95 +3806,95 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)playWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)stopPlaybackWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)startOverWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)previousWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)nextWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)rewindWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)fastForwardWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params; @@ -3932,30 +3933,30 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)showInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)hideInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeInputListWithParams:(MTRReadParams * _Nullable)params; @@ -3984,15 +3985,15 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)sleepWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; @@ -4017,13 +4018,13 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; @@ -4048,18 +4049,18 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeAcceptHeaderWithParams:(MTRReadParams * _Nullable)params; @@ -4093,16 +4094,16 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeOutputListWithParams:(MTRReadParams * _Nullable)params; @@ -4131,23 +4132,23 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeCatalogListWithParams:(MTRReadParams * _Nullable)params; @@ -4182,7 +4183,7 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeVendorNameWithParams:(MTRReadParams * _Nullable)params; @@ -4225,24 +4226,24 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)logoutWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params; @@ -4268,19 +4269,19 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getProfileInfoCommandWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params; @@ -4601,139 +4602,140 @@ labels. - (nullable instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testNotHandledWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testSpecificWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testUnknownCommandWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params expectedValues: (NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testListNestedStructListArgumentRequestWithParams: (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params expectedValues: (NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params - expectedValues: - (NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void) + testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completion: + (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)timedInvokeRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params expectedValues: (NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler; + completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; - (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params - expectedValues: - (NSArray *> * _Nullable)expectedDataValueDictionaries - expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs - completionHandler: - (void (^)( - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; + completion:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void) + testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + expectedValues: + (NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completion: + (void (^)( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - (NSDictionary *)readAttributeBooleanWithParams:(MTRReadParams * _Nullable)params; - (void)writeAttributeBooleanWithValue:(NSDictionary *)dataValueDictionary @@ -5333,6 +5335,16 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use identifyWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use triggerEffectWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterGroups (Deprecated) @@ -5341,6 +5353,44 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use addGroupWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use viewGroupWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getGroupMembershipWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use removeGroupWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use removeAllGroupsWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)removeAllGroupsWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use removeAllGroupsWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use addGroupIfIdentifyingWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterScenes (Deprecated) @@ -5349,6 +5399,65 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use addSceneWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use viewSceneWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use removeSceneWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use removeAllScenesWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use storeSceneWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use recallSceneWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getSceneMembershipWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedAddSceneWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedViewSceneWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use copySceneWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterOnOff (Deprecated) @@ -5357,6 +5466,52 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use offWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)offWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use offWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use onWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)onWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use onWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use toggleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)toggleWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use toggleWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use offWithEffectWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use onWithRecallGlobalSceneWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)onWithRecallGlobalSceneWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use onWithRecallGlobalSceneWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use onWithTimedOffWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterOnOffSwitchConfiguration (Deprecated) @@ -5373,6 +5528,51 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToLevelWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stepWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stopWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToLevelWithOnOffWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveWithOnOffWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stepWithOnOffWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stopWithOnOffWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToClosestFrequencyWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterBinaryInputBasic (Deprecated) @@ -5413,81 +5613,124 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use instantActionWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use instantActionWithTransitionWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use startActionWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use startActionWithDurationWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stopActionWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use pauseActionWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use pauseActionWithDurationWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resumeActionWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enableActionWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enableActionWithDurationWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use disableActionWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use disableActionWithDurationWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterBasic (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); - -@end - -@interface MTRClusterOtaSoftwareUpdateProvider (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); - -@end - -@interface MTRClusterOtaSoftwareUpdateRequestor (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); - -@end - -@interface MTRClusterLocalizationConfiguration (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); - -@end - -@interface MTRClusterTimeFormatLocalization (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); - -@end - -@interface MTRClusterUnitLocalization (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); - -@end - -@interface MTRClusterPowerSourceConfiguration (Deprecated) +@interface MTRClusterBasic (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use mfgSpecificPingWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)mfgSpecificPingWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use mfgSpecificPingWithExpectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterPowerSource (Deprecated) +@interface MTRClusterOtaSoftwareUpdateProvider (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use queryImageWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use applyUpdateRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use notifyUpdateAppliedWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterGeneralCommissioning (Deprecated) +@interface MTRClusterOtaSoftwareUpdateRequestor (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use announceOtaProviderWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterNetworkCommissioning (Deprecated) +@interface MTRClusterLocalizationConfiguration (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint @@ -5495,7 +5738,7 @@ labels. @end -@interface MTRClusterDiagnosticLogs (Deprecated) +@interface MTRClusterTimeFormatLocalization (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint @@ -5503,7 +5746,7 @@ labels. @end -@interface MTRClusterGeneralDiagnostics (Deprecated) +@interface MTRClusterUnitLocalization (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint @@ -5511,7 +5754,7 @@ labels. @end -@interface MTRClusterSoftwareDiagnostics (Deprecated) +@interface MTRClusterPowerSourceConfiguration (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint @@ -5519,7 +5762,7 @@ labels. @end -@interface MTRClusterThreadNetworkDiagnostics (Deprecated) +@interface MTRClusterPowerSource (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint @@ -5527,71 +5770,179 @@ labels. @end -@interface MTRClusterWiFiNetworkDiagnostics (Deprecated) +@interface MTRClusterGeneralCommissioning (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use armFailSafeWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use setRegulatoryConfigWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use commissioningCompleteWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)commissioningCompleteWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use commissioningCompleteWithExpectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterEthernetNetworkDiagnostics (Deprecated) +@interface MTRClusterNetworkCommissioning (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use scanNetworksWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use addOrUpdateWiFiNetworkWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use addOrUpdateThreadNetworkWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use removeNetworkWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use connectNetworkWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use reorderNetworkWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterBridgedDeviceBasic (Deprecated) +@interface MTRClusterDiagnosticLogs (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use retrieveLogsRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterSwitch (Deprecated) +@interface MTRClusterGeneralDiagnostics (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testEventTriggerWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterAdministratorCommissioning (Deprecated) +@interface MTRClusterSoftwareDiagnostics (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetWatermarksWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)resetWatermarksWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetWatermarksWithExpectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterOperationalCredentials (Deprecated) +@interface MTRClusterThreadNetworkDiagnostics (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithExpectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterGroupKeyManagement (Deprecated) +@interface MTRClusterWiFiNetworkDiagnostics (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithExpectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterFixedLabel (Deprecated) +@interface MTRClusterEthernetNetworkDiagnostics (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use resetCountsWithExpectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterUserLabel (Deprecated) +@interface MTRClusterBridgedDeviceBasic (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint @@ -5599,7 +5950,7 @@ labels. @end -@interface MTRClusterBooleanState (Deprecated) +@interface MTRClusterSwitch (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint @@ -5607,31 +5958,119 @@ labels. @end -@interface MTRClusterModeSelect (Deprecated) +@interface MTRClusterAdministratorCommissioning (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use openCommissioningWindowWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use openBasicCommissioningWindowWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use revokeCommissioningWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)revokeCommissioningWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use revokeCommissioningWithExpectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterDoorLock (Deprecated) +@interface MTRClusterOperationalCredentials (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use attestationRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use certificateChainRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use CSRRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use addNOCWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use updateNOCWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use updateFabricLabelWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use removeFabricWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use addTrustedRootCertificateWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterWindowCovering (Deprecated) +@interface MTRClusterGroupKeyManagement (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use keySetWriteWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use keySetReadWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use keySetRemoveWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use keySetReadAllIndicesWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterBarrierControl (Deprecated) +@interface MTRClusterFixedLabel (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint @@ -5639,7 +6078,7 @@ labels. @end -@interface MTRClusterPumpConfigurationAndControl (Deprecated) +@interface MTRClusterUserLabel (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint @@ -5647,7 +6086,7 @@ labels. @end -@interface MTRClusterThermostat (Deprecated) +@interface MTRClusterBooleanState (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint @@ -5655,30 +6094,360 @@ labels. @end -@interface MTRClusterFanControl (Deprecated) +@interface MTRClusterModeSelect (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use changeToModeWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end -@interface MTRClusterThermostatUserInterfaceConfiguration (Deprecated) +@interface MTRClusterDoorLock (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); -@end - -@interface MTRClusterColorControl (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use lockDoorWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use unlockDoorWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use unlockWithTimeoutWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use setWeekDayScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getWeekDayScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearWeekDayScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use setYearDayScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getYearDayScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearYearDayScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use setHolidayScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getHolidayScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearHolidayScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use setUserWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getUserWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearUserWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use setCredentialWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getCredentialStatusWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearCredentialWithParams:expectedValues:expectedValueIntervalMs:completion:"); +@end + +@interface MTRClusterWindowCovering (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); + +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use upOrOpenWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)upOrOpenWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use upOrOpenWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use downOrCloseWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)downOrCloseWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use downOrCloseWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stopMotionWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stopMotionWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stopMotionWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use goToLiftValueWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use goToLiftPercentageWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use goToTiltValueWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use goToTiltPercentageWithParams:expectedValues:expectedValueIntervalMs:completion:"); +@end + +@interface MTRClusterBarrierControl (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use barrierControlGoToPercentWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use barrierControlStopWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)barrierControlStopWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use barrierControlStopWithExpectedValues:expectedValueIntervalMs:completion:"); +@end + +@interface MTRClusterPumpConfigurationAndControl (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); @end +@interface MTRClusterThermostat (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); + +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use setpointRaiseLowerWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use setWeeklyScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getWeeklyScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearWeeklyScheduleWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)clearWeeklyScheduleWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use clearWeeklyScheduleWithExpectedValues:expectedValueIntervalMs:completion:"); +@end + +@interface MTRClusterFanControl (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); + +@end + +@interface MTRClusterThermostatUserInterfaceConfiguration (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); + +@end + +@interface MTRClusterColorControl (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); + +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToHueWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveHueWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stepHueWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToSaturationWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveSaturationWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stepSaturationWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToHueAndSaturationWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToColorWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveColorWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stepColorWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveToColorTemperatureWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedMoveToHueWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedMoveHueWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedStepHueWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use enhancedMoveToHueAndSaturationWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use colorLoopSetWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stopMoveStepWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use moveColorTemperatureWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use stepColorTemperatureWithParams:expectedValues:expectedValueIntervalMs:completion:"); +@end + @interface MTRClusterBallastConfiguration (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device @@ -5749,6 +6518,22 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use changeChannelWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use changeChannelByNumberWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use skipChannelWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterTargetNavigator (Deprecated) @@ -5757,6 +6542,12 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use navigateTargetWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterMediaPlayback (Deprecated) @@ -5765,6 +6556,112 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use playWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)playWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use playWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use pauseWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use pauseWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use stopPlaybackWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stopPlaybackWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use stopPlaybackWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use startOverWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)startOverWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use startOverWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use previousWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)previousWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use previousWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use nextWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)nextWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use nextWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use rewindWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)rewindWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use rewindWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use fastForwardWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)fastForwardWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use fastForwardWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use skipForwardWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use skipBackwardWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use seekWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterMediaInput (Deprecated) @@ -5773,6 +6670,34 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use selectInputWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use showInputStatusWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)showInputStatusWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use showInputStatusWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use hideInputStatusWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)hideInputStatusWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use hideInputStatusWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use renameInputWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterLowPower (Deprecated) @@ -5781,6 +6706,15 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use sleepWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)sleepWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use sleepWithExpectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterKeypadInput (Deprecated) @@ -5789,6 +6723,12 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use sendKeyWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterContentLauncher (Deprecated) @@ -5797,6 +6737,18 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use launchContentWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use launchURLWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterAudioOutput (Deprecated) @@ -5805,6 +6757,16 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use selectOutputWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use renameOutputWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterApplicationLauncher (Deprecated) @@ -5813,6 +6775,24 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use launchAppWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use stopAppWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use hideAppWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterApplicationBasic (Deprecated) @@ -5829,6 +6809,26 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use getSetupPINWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use loginWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use logoutWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)logoutWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use logoutWithExpectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterElectricalMeasurement (Deprecated) @@ -5837,6 +6837,20 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use getProfileInfoCommandWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)getProfileInfoCommandWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use getProfileInfoCommandWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use getMeasurementProfileCommandWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end @interface MTRClusterTestCluster (Deprecated) @@ -5845,6 +6859,169 @@ labels. endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_NEWLY_DEPRECATED("Please use initWithDevice:endpoindID:queue:"); +- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testNotHandledWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testNotHandledWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testNotHandledWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testSpecificWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testSpecificWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testSpecificWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testUnknownCommandWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testUnknownCommandWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use testUnknownCommandWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testAddArgumentsWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testSimpleArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testStructArrayArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testStructArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testNestedStructArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testListStructArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testListInt8UArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params + expectedValues: + (NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use testNestedStructListArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testListNestedStructListArgumentRequestWithParams: + (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params + expectedValues: + (NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use testListNestedStructListArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testListInt8UReverseRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testEnumsRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testNullableOptionalRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params + expectedValues: + (NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use testComplexNullableOptionalRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use simpleStructEchoRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use timedInvokeRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)timedInvokeRequestWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED("Please use timedInvokeRequestWithExpectedValues:expectedValueIntervalMs:completion:"); +- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params + expectedValues: + (NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler + MTR_NEWLY_DEPRECATED( + "Please use testSimpleOptionalArgumentRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED("Please use testEmitTestEventRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); +- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + expectedValues: + (NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler + MTR_NEWLY_DEPRECATED( + "Please use testEmitTestFabricScopedEventRequestWithParams:expectedValues:expectedValueIntervalMs:completion:"); @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 7f9b507ca09fd1..e743f51416f9fe 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -58,7 +58,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -73,7 +73,7 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -108,7 +108,7 @@ new MTRCommandSuccessCallbackBridge( - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -123,7 +123,7 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -242,6 +242,26 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self identifyWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self triggerEffectWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterGroups @@ -262,8 +282,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -275,7 +294,7 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -309,8 +328,8 @@ new MTRGroupsClusterAddGroupResponseCallbackBridge(self.callbackQueue, baseDevic - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -322,7 +341,7 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -355,8 +374,8 @@ new MTRGroupsClusterViewGroupResponseCallbackBridge(self.callbackQueue, baseDevi - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -368,7 +387,7 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -422,8 +441,8 @@ new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(self.callbackQueue, - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -435,7 +454,7 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -467,17 +486,17 @@ new MTRGroupsClusterRemoveGroupResponseCallbackBridge(self.callbackQueue, baseDe - (void)removeAllGroupsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self removeAllGroupsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -492,7 +511,7 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -526,7 +545,7 @@ new MTRCommandSuccessCallbackBridge( - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -541,7 +560,7 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -631,6 +650,78 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self addGroupWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self viewGroupWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getGroupMembershipWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self removeGroupWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self removeAllGroupsWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)removeAllGroupsWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self removeAllGroupsWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self addGroupIfIdentifyingWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterScenes @@ -651,8 +742,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -664,7 +754,7 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -774,8 +864,8 @@ new MTRScenesClusterAddSceneResponseCallbackBridge(self.callbackQueue, baseDevic - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -787,7 +877,7 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -821,8 +911,8 @@ new MTRScenesClusterViewSceneResponseCallbackBridge(self.callbackQueue, baseDevi - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -834,7 +924,7 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -868,8 +958,8 @@ new MTRScenesClusterRemoveSceneResponseCallbackBridge(self.callbackQueue, baseDe - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -881,7 +971,7 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -914,8 +1004,8 @@ new MTRScenesClusterRemoveAllScenesResponseCallbackBridge(self.callbackQueue, ba - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -927,7 +1017,7 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -961,7 +1051,7 @@ new MTRScenesClusterStoreSceneResponseCallbackBridge(self.callbackQueue, baseDev - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -976,7 +1066,7 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -1021,8 +1111,8 @@ new MTRCommandSuccessCallbackBridge( - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -1034,7 +1124,7 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1067,8 +1157,8 @@ new MTRScenesClusterGetSceneMembershipResponseCallbackBridge(self.callbackQueue, - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -1080,7 +1170,7 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1190,8 +1280,8 @@ new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(self.callbackQueue, b - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -1203,7 +1293,7 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1237,8 +1327,8 @@ new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(self.callbackQueue, - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -1250,7 +1340,7 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRScenesClusterCopySceneResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1381,6 +1471,115 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self addSceneWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self viewSceneWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self removeSceneWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self removeAllScenesWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self storeSceneWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self recallSceneWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getSceneMembershipWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self enhancedAddSceneWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self enhancedViewSceneWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self copySceneWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterOnOff @@ -1400,17 +1599,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)offWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { - [self offWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self offWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -1425,7 +1621,7 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -1458,17 +1654,14 @@ new MTRCommandSuccessCallbackBridge( - (void)onWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { - [self onWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self onWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -1483,7 +1676,7 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -1516,17 +1709,14 @@ new MTRCommandSuccessCallbackBridge( - (void)toggleWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { - [self toggleWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self toggleWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -1541,7 +1731,7 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -1575,7 +1765,7 @@ new MTRCommandSuccessCallbackBridge( - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -1590,7 +1780,7 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -1627,17 +1817,17 @@ new MTRCommandSuccessCallbackBridge( - (void)onWithRecallGlobalSceneWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self onWithRecallGlobalSceneWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -1652,7 +1842,7 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -1686,7 +1876,7 @@ new MTRCommandSuccessCallbackBridge( - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -1701,7 +1891,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -1882,6 +2072,92 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self offWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)offWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self offWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self onWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)onWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self onWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self toggleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)toggleWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self toggleWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self offWithEffectWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self onWithRecallGlobalSceneWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)onWithRecallGlobalSceneWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self onWithRecallGlobalSceneWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self onWithTimedOffWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterOnOffSwitchConfiguration @@ -2003,7 +2279,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -2018,7 +2294,7 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -2061,7 +2337,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -2076,7 +2352,7 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -2120,7 +2396,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -2135,7 +2411,7 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -2180,7 +2456,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -2195,7 +2471,7 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -2231,7 +2507,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -2246,7 +2522,7 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -2289,7 +2565,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -2304,7 +2580,7 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -2348,7 +2624,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -2363,7 +2639,7 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -2408,7 +2684,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -2423,7 +2699,7 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -2459,7 +2735,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -2474,7 +2750,7 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -2800,6 +3076,96 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToLevelWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stopWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToLevelWithOnOffWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveWithOnOffWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepWithOnOffWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stopWithOnOffWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToClosestFrequencyWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterBinaryInputBasic @@ -3407,7 +3773,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3422,7 +3788,7 @@ - (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -3461,7 +3827,7 @@ new MTRCommandSuccessCallbackBridge( - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3476,7 +3842,7 @@ - (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWit new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -3516,7 +3882,7 @@ new MTRCommandSuccessCallbackBridge( - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3531,7 +3897,7 @@ - (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -3570,7 +3936,7 @@ new MTRCommandSuccessCallbackBridge( - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3585,7 +3951,7 @@ - (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurat new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -3625,7 +3991,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3640,7 +4006,7 @@ - (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -3679,7 +4045,7 @@ new MTRCommandSuccessCallbackBridge( - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3694,7 +4060,7 @@ - (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -3733,7 +4099,7 @@ new MTRCommandSuccessCallbackBridge( - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3748,7 +4114,7 @@ - (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurat new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -3788,7 +4154,7 @@ new MTRCommandSuccessCallbackBridge( - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3803,7 +4169,7 @@ - (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -3842,7 +4208,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3857,7 +4223,7 @@ - (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -3896,7 +4262,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3911,7 +4277,7 @@ - (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDur new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -3951,7 +4317,7 @@ new MTRCommandSuccessCallbackBridge( - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -3966,7 +4332,7 @@ - (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -4005,7 +4371,7 @@ new MTRCommandSuccessCallbackBridge( - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -4020,7 +4386,7 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -4130,6 +4496,126 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self instantActionWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self instantActionWithTransitionWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self startActionWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self startActionWithDurationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stopActionWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self pauseActionWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self pauseActionWithDurationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resumeActionWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enableActionWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enableActionWithDurationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self disableActionWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self disableActionWithDurationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterBasic @@ -4149,17 +4635,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)mfgSpecificPingWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self mfgSpecificPingWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -4174,7 +4660,7 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -4471,6 +4957,24 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self mfgSpecificPingWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)mfgSpecificPingWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self mfgSpecificPingWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterOtaSoftwareUpdateProvider @@ -4491,8 +4995,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -4504,7 +5008,7 @@ - (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParam MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -4579,8 +5083,8 @@ new MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(self.cal - (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -4592,7 +5096,7 @@ - (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUp MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -4626,7 +5130,7 @@ new MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(self.ca - (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -4641,7 +5145,7 @@ - (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotify new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -4723,6 +5227,38 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self queryImageWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self applyUpdateRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self notifyUpdateAppliedWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterOtaSoftwareUpdateRequestor @@ -4743,7 +5279,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -4758,7 +5294,7 @@ - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnou new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -4899,6 +5435,16 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self announceOtaProviderWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterLocalizationConfiguration @@ -5629,8 +6175,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -5642,7 +6188,7 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -5676,8 +6222,8 @@ new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(self.callbac - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -5689,8 +6235,7 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(self.callbackQueue, baseDevice, - completionHandler, + new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -5726,21 +6271,22 @@ new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(self - (void)commissioningCompleteWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion: + (void (^)( + MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completion { [self commissioningCompleteWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -5752,8 +6298,7 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(self.callbackQueue, baseDevice, - completionHandler, + new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -5891,6 +6436,50 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self armFailSafeWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self setRegulatoryConfigWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self commissioningCompleteWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)commissioningCompleteWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self commissioningCompleteWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterNetworkCommissioning @@ -5911,8 +6500,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -5924,7 +6513,7 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -5971,8 +6560,8 @@ new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(self.callba - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -5984,7 +6573,7 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -6022,8 +6611,8 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callb - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -6035,7 +6624,7 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -6072,8 +6661,8 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callb - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -6085,7 +6674,7 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -6122,8 +6711,8 @@ new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callb - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -6135,7 +6724,7 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -6172,8 +6761,8 @@ new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(self.call - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -6185,7 +6774,7 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -6352,6 +6941,72 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self scanNetworksWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self addOrUpdateWiFiNetworkWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self addOrUpdateThreadNetworkWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self removeNetworkWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self connectNetworkWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self reorderNetworkWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterDiagnosticLogs @@ -6372,8 +7027,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -6385,7 +7040,7 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -6467,6 +7122,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self retrieveLogsRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterGeneralDiagnostics @@ -6487,7 +7153,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -6502,7 +7168,7 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -6656,6 +7322,16 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testEventTriggerWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterSoftwareDiagnostics @@ -6675,17 +7351,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)resetWatermarksWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self resetWatermarksWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -6700,7 +7376,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -6812,6 +7488,24 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetWatermarksWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)resetWatermarksWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetWatermarksWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterThreadNetworkDiagnostics @@ -6831,17 +7525,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self resetCountsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -6856,7 +7550,7 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -7441,6 +8135,22 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} @end @implementation MTRClusterWiFiNetworkDiagnostics @@ -7460,17 +8170,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self resetCountsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -7485,7 +8195,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -7669,6 +8379,22 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} @end @implementation MTRClusterEthernetNetworkDiagnostics @@ -7688,17 +8414,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self resetCountsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -7713,7 +8439,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -7865,6 +8591,22 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)resetCountsWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} @end @implementation MTRClusterBridgedDeviceBasic @@ -8180,7 +8922,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -8195,7 +8937,7 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -8237,7 +8979,7 @@ new MTRCommandSuccessCallbackBridge( - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -8252,7 +8994,7 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -8289,17 +9031,17 @@ new MTRCommandSuccessCallbackBridge( - (void)revokeCommissioningWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self revokeCommissioningWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -8314,7 +9056,7 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -8421,6 +9163,44 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self openCommissioningWindowWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self openBasicCommissioningWindowWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self revokeCommissioningWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)revokeCommissioningWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self revokeCommissioningWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterOperationalCredentials @@ -8441,8 +9221,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -8454,7 +9234,7 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8487,8 +9267,8 @@ new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callb - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -8500,8 +9280,7 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self.callbackQueue, baseDevice, - completionHandler, + new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8535,8 +9314,8 @@ new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self. - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -8548,7 +9327,7 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8585,8 +9364,8 @@ new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -8598,7 +9377,7 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8639,8 +9418,8 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -8652,7 +9431,7 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8689,8 +9468,8 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -8702,7 +9481,7 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8735,8 +9514,8 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -8748,7 +9527,7 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8781,7 +9560,7 @@ new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -8796,7 +9575,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -8925,6 +9704,93 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self attestationRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self certificateChainRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self CSRRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self addNOCWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self updateNOCWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self updateFabricLabelWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self removeFabricWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self addTrustedRootCertificateWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterGroupKeyManagement @@ -8945,7 +9811,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -8960,7 +9826,7 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -9034,8 +9900,8 @@ new MTRCommandSuccessCallbackBridge( - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -9047,7 +9913,7 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -9080,7 +9946,7 @@ new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQu - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -9095,7 +9961,7 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -9130,8 +9996,8 @@ new MTRCommandSuccessCallbackBridge( - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -9143,8 +10009,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(self.callbackQueue, baseDevice, - completionHandler, + new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -9296,6 +10161,48 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self keySetWriteWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self keySetReadWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self keySetRemoveWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self keySetReadAllIndicesWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterFixedLabel @@ -9557,7 +10464,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -9572,7 +10479,7 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -9739,6 +10646,16 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self changeToModeWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterDoorLock @@ -9759,7 +10676,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -9774,7 +10691,7 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -9817,7 +10734,7 @@ new MTRCommandSuccessCallbackBridge( - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -9832,7 +10749,7 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -9875,7 +10792,7 @@ new MTRCommandSuccessCallbackBridge( - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -9890,7 +10807,7 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -9932,7 +10849,7 @@ new MTRCommandSuccessCallbackBridge( - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -9947,7 +10864,7 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -9989,8 +10906,8 @@ new MTRCommandSuccessCallbackBridge( - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -10002,7 +10919,7 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -10036,7 +10953,7 @@ new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(self.callbackQueu - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -10051,7 +10968,7 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -10087,7 +11004,7 @@ new MTRCommandSuccessCallbackBridge( - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -10102,7 +11019,7 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -10140,8 +11057,8 @@ new MTRCommandSuccessCallbackBridge( - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -10153,7 +11070,7 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -10187,7 +11104,7 @@ new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(self.callbackQueu - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -10202,7 +11119,7 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -10238,7 +11155,7 @@ new MTRCommandSuccessCallbackBridge( - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -10253,7 +11170,7 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -10292,8 +11209,8 @@ new MTRCommandSuccessCallbackBridge( - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -10305,7 +11222,7 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -10338,7 +11255,7 @@ new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(self.callbackQueu - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -10353,7 +11270,7 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -10388,7 +11305,7 @@ new MTRCommandSuccessCallbackBridge( - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -10403,7 +11320,7 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -10476,8 +11393,7 @@ new MTRCommandSuccessCallbackBridge( - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -10489,7 +11405,7 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -10522,7 +11438,7 @@ new MTRDoorLockClusterGetUserResponseCallbackBridge(self.callbackQueue, baseDevi - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -10537,7 +11453,7 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -10575,8 +11491,8 @@ new MTRCommandSuccessCallbackBridge( - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -10588,7 +11504,7 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -10650,8 +11566,8 @@ new MTRDoorLockClusterSetCredentialResponseCallbackBridge(self.callbackQueue, ba - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -10663,7 +11579,7 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -10699,7 +11615,7 @@ new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(self.callbackQue - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -10714,7 +11630,7 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -11449,6 +12365,192 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self lockDoorWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self unlockDoorWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self unlockWithTimeoutWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self setWeekDayScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getWeekDayScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self clearWeekDayScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self setYearDayScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getYearDayScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self clearYearDayScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self setHolidayScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getHolidayScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self clearHolidayScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self setUserWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self getUserWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self clearUserWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self setCredentialWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getCredentialStatusWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self clearCredentialWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterWindowCovering @@ -11468,17 +12570,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)upOrOpenWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { - [self upOrOpenWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self upOrOpenWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -11493,7 +12592,7 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -11526,17 +12625,17 @@ new MTRCommandSuccessCallbackBridge( - (void)downOrCloseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self downOrCloseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -11551,7 +12650,7 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -11584,17 +12683,17 @@ new MTRCommandSuccessCallbackBridge( - (void)stopMotionWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self stopMotionWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -11609,7 +12708,7 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -11643,7 +12742,7 @@ new MTRCommandSuccessCallbackBridge( - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -11658,7 +12757,7 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -11693,7 +12792,7 @@ new MTRCommandSuccessCallbackBridge( - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -11708,7 +12807,7 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -11743,7 +12842,7 @@ new MTRCommandSuccessCallbackBridge( - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -11758,7 +12857,7 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -11793,7 +12892,7 @@ new MTRCommandSuccessCallbackBridge( - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -11808,7 +12907,7 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -12084,6 +13183,94 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self upOrOpenWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)upOrOpenWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self upOrOpenWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self downOrCloseWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)downOrCloseWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self downOrCloseWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stopMotionWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stopMotionWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stopMotionWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self goToLiftValueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self goToLiftPercentageWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self goToTiltValueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self goToTiltPercentageWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterBarrierControl @@ -12104,7 +13291,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -12119,7 +13306,7 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -12153,17 +13340,17 @@ new MTRCommandSuccessCallbackBridge( - (void)barrierControlStopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self barrierControlStopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -12178,7 +13365,7 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -12456,6 +13643,34 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self barrierControlGoToPercentWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self barrierControlStopWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)barrierControlStopWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self barrierControlStopWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterPumpConfigurationAndControl @@ -12804,7 +14019,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -12819,7 +14034,7 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -12855,7 +14070,7 @@ new MTRCommandSuccessCallbackBridge( - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -12870,7 +14085,7 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -12943,8 +14158,8 @@ new MTRCommandSuccessCallbackBridge( - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -12956,7 +14171,7 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -12991,17 +14206,17 @@ new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(self.callbackQue - (void)clearWeeklyScheduleWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self clearWeeklyScheduleWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -13016,7 +14231,7 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -14021,6 +15236,55 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self setpointRaiseLowerWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self setWeeklyScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getWeeklyScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self clearWeeklyScheduleWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)clearWeeklyScheduleWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self clearWeeklyScheduleWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterFanControl @@ -14463,7 +15727,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14478,7 +15742,7 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -14518,7 +15782,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14533,7 +15797,7 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -14572,7 +15836,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14587,7 +15851,7 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -14627,7 +15891,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14642,7 +15906,7 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -14680,7 +15944,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14695,7 +15959,7 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -14734,7 +15998,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14749,7 +16013,7 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -14789,7 +16053,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14804,7 +16068,7 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -14843,7 +16107,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14858,7 +16122,7 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -14897,7 +16161,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14912,7 +16176,7 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -14950,7 +16214,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14965,7 +16229,7 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -15004,7 +16268,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -15019,7 +16283,7 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -15057,7 +16321,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -15072,7 +16336,7 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -15112,7 +16376,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -15127,7 +16391,7 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -15166,7 +16430,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -15181,7 +16445,7 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -15221,7 +16485,7 @@ new MTRCommandSuccessCallbackBridge( - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -15236,7 +16500,7 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -15275,7 +16539,7 @@ new MTRCommandSuccessCallbackBridge( - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -15290,7 +16554,7 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -15333,7 +16597,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -15348,7 +16612,7 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -15384,7 +16648,7 @@ new MTRCommandSuccessCallbackBridge( - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -15399,7 +16663,7 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -15440,7 +16704,7 @@ new MTRCommandSuccessCallbackBridge( - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -15455,7 +16719,7 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -16208,6 +17472,196 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToSaturationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveSaturationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepSaturationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToHueAndSaturationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToColorWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveColorWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepColorWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToColorTemperatureWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedMoveToHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedMoveHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedStepHueWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedMoveToHueAndSaturationWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self colorLoopSetWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stopMoveStepWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveColorTemperatureWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepColorTemperatureWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterBallastConfiguration @@ -17567,8 +19021,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -17580,7 +19034,7 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRChannelClusterChangeChannelResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRChannelClusterChangeChannelResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17613,7 +19067,7 @@ new MTRChannelClusterChangeChannelResponseCallbackBridge(self.callbackQueue, bas - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -17628,7 +19082,7 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -17664,7 +19118,7 @@ new MTRCommandSuccessCallbackBridge( - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -17679,7 +19133,7 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -17784,6 +19238,37 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self changeChannelWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self changeChannelByNumberWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self skipChannelWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterTargetNavigator @@ -17804,8 +19289,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -17817,7 +19302,7 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17916,6 +19401,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self navigateTargetWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterMediaPlayback @@ -17935,19 +19431,16 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)playWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { - [self playWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self playWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -17959,7 +19452,7 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17990,19 +19483,16 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { - [self pauseWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -18014,7 +19504,7 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18045,19 +19535,19 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)stopPlaybackWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { [self stopPlaybackWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -18069,7 +19559,7 @@ - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nul MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18100,19 +19590,19 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)startOverWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { [self startOverWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -18124,7 +19614,7 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18155,19 +19645,16 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)previousWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { - [self previousWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self previousWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -18179,7 +19666,7 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18210,19 +19697,16 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)nextWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { - [self nextWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self nextWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -18234,7 +19718,7 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18265,19 +19749,16 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)rewindWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { - [self rewindWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self rewindWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -18289,7 +19770,7 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18320,19 +19801,19 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)fastForwardWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { [self fastForwardWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -18344,7 +19825,7 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18376,8 +19857,8 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -18389,7 +19870,7 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18422,8 +19903,8 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -18435,7 +19916,7 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18468,8 +19949,8 @@ new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, ba - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -18481,7 +19962,7 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18616,6 +20097,183 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self playWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)playWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self playWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self pauseWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self pauseWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self stopPlaybackWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stopPlaybackWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self stopPlaybackWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self startOverWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)startOverWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self startOverWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self previousWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)previousWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self previousWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self nextWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)nextWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self nextWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self rewindWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)rewindWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self rewindWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self fastForwardWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)fastForwardWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self fastForwardWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self skipForwardWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self skipBackwardWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self seekWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterMediaInput @@ -18636,7 +20294,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -18651,7 +20309,7 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -18685,17 +20343,17 @@ new MTRCommandSuccessCallbackBridge( - (void)showInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self showInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -18710,7 +20368,7 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -18743,17 +20401,17 @@ new MTRCommandSuccessCallbackBridge( - (void)hideInputStatusWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self hideInputStatusWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -18768,7 +20426,7 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -18802,7 +20460,7 @@ new MTRCommandSuccessCallbackBridge( - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -18817,7 +20475,7 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -18915,6 +20573,62 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self selectInputWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self showInputStatusWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)showInputStatusWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self showInputStatusWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self hideInputStatusWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)hideInputStatusWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self hideInputStatusWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self renameInputWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterLowPower @@ -18934,17 +20648,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)sleepWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { - [self sleepWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self sleepWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -18959,7 +20670,7 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -19039,6 +20750,22 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self sleepWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)sleepWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self sleepWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} @end @implementation MTRClusterKeypadInput @@ -19059,8 +20786,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -19072,7 +20799,7 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRKeypadInputClusterSendKeyResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRKeypadInputClusterSendKeyResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19151,6 +20878,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self sendKeyWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterContentLauncher @@ -19171,8 +20909,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -19184,7 +20922,7 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19274,8 +21012,8 @@ new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, ba - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -19287,7 +21025,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRContentLauncherClusterLaunchResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19498,9 +21236,31 @@ @implementation MTRClusterContentLauncher (Deprecated) - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self launchContentWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self launchURLWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; } - @end @implementation MTRClusterAudioOutput @@ -19521,7 +21281,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -19536,7 +21296,7 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -19571,7 +21331,7 @@ new MTRCommandSuccessCallbackBridge( - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -19586,7 +21346,7 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -19684,6 +21444,26 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self selectOutputWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self renameOutputWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterApplicationLauncher @@ -19704,8 +21484,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -19717,7 +21497,7 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)para MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19755,8 +21535,8 @@ new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQue - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -19768,7 +21548,7 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19802,8 +21582,8 @@ new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQue - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -19815,7 +21595,7 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRApplicationLauncherClusterLauncherResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19930,6 +21710,39 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self launchAppWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self stopAppWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self hideAppWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterApplicationBasic @@ -20080,8 +21893,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -20093,7 +21906,7 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -20129,7 +21942,7 @@ new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(self.callbackQueue, - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -20144,7 +21957,7 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -20182,17 +21995,14 @@ new MTRCommandSuccessCallbackBridge( - (void)logoutWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { - [self logoutWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self logoutWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -20207,7 +22017,7 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -20290,6 +22100,43 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self getSetupPINWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self loginWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self logoutWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)logoutWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self logoutWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} @end @implementation MTRClusterElectricalMeasurement @@ -20309,17 +22156,17 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)getProfileInfoCommandWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self getProfileInfoCommandWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -20334,7 +22181,7 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -20368,7 +22215,7 @@ new MTRCommandSuccessCallbackBridge( - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -20383,7 +22230,7 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -21654,6 +23501,34 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self getProfileInfoCommandWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)getProfileInfoCommandWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self getProfileInfoCommandWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self getMeasurementProfileCommandWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end @implementation MTRClusterTestCluster @@ -21673,17 +23548,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi - (void)testWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { - [self testWithParams:nil - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + [self testWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -21698,7 +23570,7 @@ - (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -21731,17 +23603,17 @@ new MTRCommandSuccessCallbackBridge( - (void)testNotHandledWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self testNotHandledWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -21756,7 +23628,7 @@ - (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _N new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -21789,19 +23661,19 @@ new MTRCommandSuccessCallbackBridge( - (void)testSpecificWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completion { [self testSpecificWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -21813,7 +23685,7 @@ - (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nulla MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -21844,17 +23716,17 @@ new MTRTestClusterClusterTestSpecificResponseCallbackBridge(self.callbackQueue, - (void)testUnknownCommandWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self testUnknownCommandWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -21869,7 +23741,7 @@ - (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandPar new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -21903,8 +23775,8 @@ new MTRCommandSuccessCallbackBridge( - (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -21916,7 +23788,7 @@ - (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -21950,8 +23822,8 @@ new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(self.callbackQue - (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -21963,7 +23835,7 @@ - (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgu MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -21996,9 +23868,9 @@ new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(self.callbackQ - (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -22010,7 +23882,7 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStruc MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -22254,8 +24126,8 @@ new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(self.call - (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -22267,7 +24139,7 @@ - (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgu MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -22307,8 +24179,8 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseD - (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -22320,7 +24192,7 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNest MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -22364,8 +24236,8 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseD - (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -22377,7 +24249,7 @@ - (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListSt MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -22440,8 +24312,8 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseD - (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -22453,7 +24325,7 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -22507,8 +24379,8 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseD - (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -22520,7 +24392,7 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTest MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -22662,8 +24534,8 @@ - (void)testListNestedStructListArgumentRequestWithParams: (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -22675,7 +24547,7 @@ - (void)testListNestedStructListArgumentRequestWithParams: MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -22841,8 +24713,8 @@ new MTRTestClusterClusterBooleanResponseCallbackBridge(self.callbackQueue, baseD - (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -22854,7 +24726,7 @@ - (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8 MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -22908,8 +24780,8 @@ new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(self.callbac - (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -22921,7 +24793,7 @@ - (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -22955,8 +24827,8 @@ new MTRTestClusterClusterTestEnumsResponseCallbackBridge(self.callbackQueue, bas - (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -22968,7 +24840,7 @@ - (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullable MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -23011,9 +24883,10 @@ new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(self.callbac - (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion: + (void (^)( + MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -23025,8 +24898,7 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestC MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, baseDevice, - completionHandler, + new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -23229,8 +25101,8 @@ new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(self. - (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -23242,7 +25114,7 @@ - (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEcho MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -23281,17 +25153,17 @@ new MTRTestClusterClusterSimpleStructResponseCallbackBridge(self.callbackQueue, - (void)timedInvokeRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { [self timedInvokeRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs - completionHandler:completionHandler]; + completion:completion]; } - (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -23306,7 +25178,7 @@ - (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestPar new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -23343,7 +25215,7 @@ new MTRCommandSuccessCallbackBridge( - (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -23358,7 +25230,7 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSi new MTRCommandSuccessCallbackBridge( self.callbackQueue, baseDevice, ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + completion(error); [workItem endWork]; }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { @@ -23398,8 +25270,8 @@ new MTRCommandSuccessCallbackBridge( - (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params expectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completion:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -23411,7 +25283,7 @@ - (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEve MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, baseDevice, completionHandler, + new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -23443,13 +25315,14 @@ new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(self.callbackQu } } -- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params - expectedValues:(NSArray *> *)expectedValues - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - completionHandler: - (void (^)( - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void) + testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion: + (void (^)( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completion { // Make a copy of params before we go async. params = [params copy]; @@ -23461,8 +25334,7 @@ - (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTes MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID controller:self.device.deviceController]; - new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, baseDevice, - completionHandler, + new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(self.callbackQueue, baseDevice, completion, ^(ExchangeManager & exchangeManager, const SessionHandle & session, Cancelable * success, Cancelable * failure) { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -25772,6 +27644,290 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } +- (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testNotHandledWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testNotHandledWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testNotHandledWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testSpecificWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testSpecificWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testSpecificWithExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completionHandler]; +} +- (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testUnknownCommandWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testUnknownCommandWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testUnknownCommandWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testAddArgumentsWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testSimpleArgumentRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testStructArrayArgumentRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testStructArgumentRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testNestedStructArgumentRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testListStructArgumentRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testListInt8UArgumentRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params + expectedValues: + (NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testNestedStructListArgumentRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testListNestedStructListArgumentRequestWithParams: + (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params + expectedValues: + (NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testListNestedStructListArgumentRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testListInt8UReverseRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testEnumsRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testNullableOptionalRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params + expectedValues: + (NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testComplexNullableOptionalRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self simpleStructEchoRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self timedInvokeRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)timedInvokeRequestWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self timedInvokeRequestWithExpectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params + expectedValues: + (NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self testSimpleOptionalArgumentRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testEmitTestEventRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} +- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + expectedValues: + (NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completionHandler: + (void (^)( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testEmitTestFabricScopedEventRequestWithParams:params + expectedValues:expectedDataValueDictionaries + expectedValueInterval:expectedValueIntervalMs + completion:completionHandler]; +} @end // NOLINTEND(clang-analyzer-cplusplus.NewDeleteLeaks) diff --git a/src/darwin/Framework/CHIPTests/MTRControllerTests.m b/src/darwin/Framework/CHIPTests/MTRControllerTests.m index 3f159f188de981..748e473bd71616 100644 --- a/src/darwin/Framework/CHIPTests/MTRControllerTests.m +++ b/src/darwin/Framework/CHIPTests/MTRControllerTests.m @@ -252,9 +252,9 @@ - (void)testControllerInvalidAccess XCTAssertFalse([controller isRunning]); XCTAssertFalse([controller getBaseDevice:1234 queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable chipDevice, NSError * _Nullable error) { - XCTAssertEqual(error.code, MTRErrorCodeInvalidState); - }]); + completion:^(MTRBaseDevice * _Nullable chipDevice, NSError * _Nullable error) { + XCTAssertEqual(error.code, MTRErrorCodeInvalidState); + }]); [factory shutdown]; XCTAssertFalse([factory isRunning]); diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 7e2d6006fc4ffe..7245da7e0512b4 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -63,11 +63,11 @@ static void WaitForCommissionee(XCTestExpectation * expectation) [controller getBaseDevice:kDeviceId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertEqual(error.code, 0); - [expectation fulfill]; - mConnectedDevice = device; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertEqual(error.code, 0); + [expectation fulfill]; + mConnectedDevice = device; + }]; } static MTRBaseDevice * GetConnectedDevice(void) @@ -78,7 +78,7 @@ static void WaitForCommissionee(XCTestExpectation * expectation) #ifdef DEBUG @interface MTRBaseDevice (Test) -- (void)failSubscribers:(dispatch_queue_t)clientQueue completion:(void (^)(void))completion; +- (void)failSubscribers:(dispatch_queue_t)queue completion:(void (^)(void))completion; @end #endif @@ -190,11 +190,11 @@ - (void)initStack __block XCTestExpectation * connectionExpectation = [self expectationWithDescription:@"CASE established"]; [controller getBaseDevice:kDeviceId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertEqual(error.code, 0); - [connectionExpectation fulfill]; - connectionExpectation = nil; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertEqual(error.code, 0); + [connectionExpectation fulfill]; + connectionExpectation = nil; + }]; [self waitForExpectationsWithTimeout:kCASESetupTimeoutInSeconds handler:nil]; } @@ -241,7 +241,7 @@ - (void)test001_ReadAttribute clusterID:@29 attributeID:@0 params:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); @@ -284,7 +284,7 @@ - (void)test002_WriteAttribute attributeID:@17 value:writeValue timedWriteTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"write attribute: Brightness values: %@, error: %@", values, error); @@ -332,7 +332,7 @@ - (void)test003_InvokeCommand commandID:@4 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); @@ -377,7 +377,7 @@ - (void)test004_InvokeTimedCommand commandID:@0 commandFields:fields timedInvokeTimeout:@10000 - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: Off values: %@, error: %@", values, error); @@ -421,7 +421,7 @@ - (void)test005_Subscribe minInterval:@1 maxInterval:@10 params:nil - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -464,7 +464,7 @@ - (void)test005_Subscribe commandID:@1 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -514,7 +514,7 @@ - (void)test005_Subscribe commandID:@0 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -538,10 +538,10 @@ - (void)test005_Subscribe [self waitForExpectations:[NSArray arrayWithObject:reportExpectation] timeout:kTimeoutInSeconds]; expectation = [self expectationWithDescription:@"Report handler deregistered"]; - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - [expectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + [expectation fulfill]; + }]; [self waitForExpectations:@[ expectation ] timeout:kTimeoutInSeconds]; } @@ -561,7 +561,7 @@ - (void)test006_ReadAttributeFailure clusterID:@10000 attributeID:@0 params:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); @@ -593,7 +593,7 @@ - (void)test007_WriteAttributeFailure attributeID:@10000 value:writeValue timedWriteTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"write attribute: Brightness values: %@, error: %@", values, error); @@ -630,7 +630,7 @@ - (void)test008_InvokeCommandFailure commandID:@40000 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); @@ -667,11 +667,11 @@ - (void)test009_SubscribeFailure XCTestExpectation * cleanSubscriptionExpectation = [self expectationWithDescription:@"Previous subscriptions cleaned"]; NSLog(@"Deregistering report handlers..."); - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - NSLog(@"Report handlers deregistered"); - [cleanSubscriptionExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + NSLog(@"Report handlers deregistered"); + [cleanSubscriptionExpectation fulfill]; + }]; [self waitForExpectations:@[ cleanSubscriptionExpectation ] timeout:kTimeoutInSeconds]; __auto_type * params = [[MTRSubscribeParams alloc] init]; @@ -682,7 +682,7 @@ - (void)test009_SubscribeFailure minInterval:@2 maxInterval:@10 params:params - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -717,7 +717,7 @@ - (void)test010_ReadAllAttribute clusterID:@29 attributeID:nil params:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); @@ -752,11 +752,11 @@ - (void)test011_ReadCachedAttribute dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * cleanSubscriptionExpectation = [self expectationWithDescription:@"Previous subscriptions cleaned"]; NSLog(@"Deregistering report handlers..."); - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - NSLog(@"Report handlers deregistered"); - [cleanSubscriptionExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + NSLog(@"Report handlers deregistered"); + [cleanSubscriptionExpectation fulfill]; + }]; [self waitForExpectations:@[ cleanSubscriptionExpectation ] timeout:kTimeoutInSeconds]; __auto_type attributeCacheContainer = [[MTRAttributeCacheContainer alloc] init]; @@ -805,7 +805,7 @@ - (void)test011_ReadCachedAttribute XCTAssertNotNil(cluster); NSLog(@"Invoking command..."); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"Invoked command with error: %@", err); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], 0); [commandExpectation fulfill]; @@ -822,12 +822,12 @@ - (void)test011_ReadCachedAttribute [MTRBaseClusterOnOff readAttributeOnOffWithAttributeCache:attributeCacheContainer endpoint:@1 queue:queue - completionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute cache value: %@, error: %@", value, err); - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], 0); - XCTAssertTrue([value isEqualToNumber:[NSNumber numberWithBool:YES]]); - [cacheExpectation fulfill]; - }]; + completion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute cache value: %@, error: %@", value, err); + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], 0); + XCTAssertTrue([value isEqualToNumber:[NSNumber numberWithBool:YES]]); + [cacheExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObject:cacheExpectation] timeout:kTimeoutInSeconds]; // Add another subscriber of the attribute to verify that attribute cache still works when there are other subscribers. @@ -870,7 +870,7 @@ - (void)test011_ReadCachedAttribute NSLog(@"Invoking another command..."); commandExpectation = [self expectationWithDescription:@"Command invoked"]; - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Invoked command with error: %@", err); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], 0); [commandExpectation fulfill]; @@ -892,12 +892,12 @@ - (void)test011_ReadCachedAttribute [MTRBaseClusterOnOff readAttributeOnOffWithAttributeCache:attributeCacheContainer endpoint:@1 queue:queue - completionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute cache value: %@, error: %@", value, err); - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], 0); - XCTAssertTrue([value isEqualToNumber:[NSNumber numberWithBool:NO]]); - [cacheExpectation fulfill]; - }]; + completion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute cache value: %@, error: %@", value, err); + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:err], 0); + XCTAssertTrue([value isEqualToNumber:[NSNumber numberWithBool:NO]]); + [cacheExpectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObject:cacheExpectation] timeout:kTimeoutInSeconds]; // Read from cache using generic path @@ -907,7 +907,7 @@ - (void)test011_ReadCachedAttribute readAttributeWithEndpointID:@1 clusterID:@6 attributeID:@0 - clientQueue:queue + queue:queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { NSLog(@"Read attribute cache value: %@, error %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -930,7 +930,7 @@ - (void)test011_ReadCachedAttribute readAttributeWithEndpointID:nil clusterID:@6 attributeID:@0 - clientQueue:queue + queue:queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { NSLog(@"Read attribute cache value: %@, error %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -952,7 +952,7 @@ - (void)test011_ReadCachedAttribute readAttributeWithEndpointID:@1 clusterID:nil attributeID:@0 - clientQueue:queue + queue:queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { NSLog(@"Read attribute cache value: %@, error %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -973,7 +973,7 @@ - (void)test011_ReadCachedAttribute readAttributeWithEndpointID:@1 clusterID:@6 attributeID:nil - clientQueue:queue + queue:queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { NSLog(@"Read attribute cache value: %@, error %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -995,7 +995,7 @@ - (void)test011_ReadCachedAttribute readAttributeWithEndpointID:nil clusterID:nil attributeID:@0 - clientQueue:queue + queue:queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { NSLog(@"Read attribute cache value: %@, error %@", values, error); XCTAssertNotNil(error); @@ -1015,10 +1015,10 @@ - (void)test012_SubscriptionError MTRBaseDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * deregisterExpectation = [self expectationWithDescription:@"Report handler deregistered"]; - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - [deregisterExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + [deregisterExpectation fulfill]; + }]; [self waitForExpectations:@[ deregisterExpectation ] timeout:kTimeoutInSeconds]; // Subscribe @@ -1029,7 +1029,7 @@ - (void)test012_SubscriptionError minInterval:@1 maxInterval:@10 params:nil - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -1072,7 +1072,7 @@ - (void)test012_SubscriptionError commandID:@1 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1106,10 +1106,10 @@ - (void)test012_SubscriptionError [self waitForExpectations:@[ failureExpectation ] timeout:kTimeoutInSeconds]; deregisterExpectation = [self expectationWithDescription:@"Report handler deregistered"]; - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - [deregisterExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + [deregisterExpectation fulfill]; + }]; [self waitForExpectations:@[ deregisterExpectation ] timeout:kTimeoutInSeconds]; } #endif @@ -1128,12 +1128,12 @@ - (void)test013_ReuseChipClusterObject __block XCTestExpectation * connectionExpectation = [self expectationWithDescription:@"CASE established"]; [controller getBaseDevice:kDeviceId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable retrievedDevice, NSError * _Nullable error) { - XCTAssertEqual(error.code, 0); - [connectionExpectation fulfill]; - connectionExpectation = nil; - device = retrievedDevice; - }]; + completion:^(MTRBaseDevice * _Nullable retrievedDevice, NSError * _Nullable error) { + XCTAssertEqual(error.code, 0); + [connectionExpectation fulfill]; + connectionExpectation = nil; + device = retrievedDevice; + }]; [self waitForExpectationsWithTimeout:kCASESetupTimeoutInSeconds handler:nil]; XCTestExpectation * expectation = [self expectationWithDescription:@"ReuseMTRClusterObjectFirstCall"]; @@ -1142,7 +1142,7 @@ - (void)test013_ReuseChipClusterObject MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(1) queue:queue]; XCTAssertNotNil(cluster); - [cluster testWithCompletionHandler:^(NSError * err) { + [cluster testWithCompletion:^(NSError * err) { NSLog(@"ReuseMTRClusterObject test Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; @@ -1154,7 +1154,7 @@ - (void)test013_ReuseChipClusterObject // Reuse the MTRCluster Object for multiple times. - [cluster testWithCompletionHandler:^(NSError * err) { + [cluster testWithCompletion:^(NSError * err) { NSLog(@"ReuseMTRClusterObject test Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; @@ -1185,7 +1185,7 @@ - (void)test014_InvokeCommandWithDifferentIdResponse commandID:@4 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: KeySetReadAllIndices values: %@, error: %@", values, error); @@ -1369,11 +1369,11 @@ - (void)test900_SubscribeAllAttributes dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * cleanSubscriptionExpectation = [self expectationWithDescription:@"Previous subscriptions cleaned"]; NSLog(@"Deregistering report handlers..."); - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - NSLog(@"Report handlers deregistered"); - [cleanSubscriptionExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + NSLog(@"Report handlers deregistered"); + [cleanSubscriptionExpectation fulfill]; + }]; [self waitForExpectations:@[ cleanSubscriptionExpectation ] timeout:kTimeoutInSeconds]; XCTestExpectation * expectation = [self expectationWithDescription:@"subscribe OnOff attribute"]; @@ -1385,7 +1385,7 @@ - (void)test900_SubscribeAllAttributes minInterval:@2 maxInterval:@10 params:nil - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"Subscribe all - report attribute values: %@, error: %@, report handler: %d", values, error, (reportHandler != nil)); @@ -1428,7 +1428,7 @@ - (void)test900_SubscribeAllAttributes commandID:@0 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1458,7 +1458,7 @@ - (void)test900_SubscribeAllAttributes commandID:@1 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1507,7 +1507,7 @@ - (void)test900_SubscribeAllAttributes commandID:@0 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); diff --git a/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.m b/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.m index 0267d91db7852a..28aeb68f7bbbc2 100644 --- a/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.m +++ b/src/darwin/Framework/CHIPTests/MTRTestOTAProvider.m @@ -23,21 +23,21 @@ @implementation MTRTestOTAProvider - (void)handleQueryImageForNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller params:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params - completionHandler:(MTRQueryImageCompletionHandler)completionHandler + completion:(MTRQueryImageCompletionHandler)completion { } - (void)handleApplyUpdateRequestForNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller params:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params - completionHandler:(MTRApplyUpdateRequestCompletionHandler)completionHandler + completion:(MTRApplyUpdateRequestCompletionHandler)completion { } - (void)handleNotifyUpdateAppliedForNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller params:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { } @@ -45,7 +45,7 @@ - (void)handleBDXTransferSessionBeginForNodeID:(NSNumber * _Nonnull)nodeID controller:(MTRDeviceController * _Nonnull)controller fileDesignator:(NSString * _Nonnull)fileDesignator offset:(NSNumber * _Nonnull)offset - completionHandler:(StatusCompletion)completionHandler + completion:(MTRStatusCompletion)completion { } @@ -60,7 +60,7 @@ - (void)handleBDXQueryForNodeID:(NSNumber * _Nonnull)nodeID blockSize:(NSNumber * _Nonnull)blockSize blockIndex:(NSNumber * _Nonnull)blockIndex bytesToSkip:(NSNumber * _Nonnull)bytesToSkip - completionHandler:(MTRBDXQueryCompletionHandler)completionHandler + completion:(MTRBDXQueryCompletionHandler)completion { } diff --git a/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m b/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m index 64a3376da229fb..9e5c6b9db1419b 100644 --- a/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m +++ b/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m @@ -173,24 +173,25 @@ - (void)readAttributeWithController:(id)controller (void) controller; __auto_type sharedController = sController; if (sharedController) { - [sharedController getBaseDevice:nodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - if (error) { - NSLog(@"Failed to get connected device"); - completion(nil, error); - } else { - [device readAttributeWithEndpointId:endpointId - clusterId:clusterId - attributeId:attributeId - params:[MTRDeviceController decodeXPCReadParams:params] - clientQueue:dispatch_get_main_queue() - completion:^(NSArray *> * _Nullable values, - NSError * _Nullable error) { - completion([MTRDeviceController encodeXPCResponseValues:values], error); - }]; - } - }]; + [sharedController + getBaseDevice:nodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + if (error) { + NSLog(@"Failed to get connected device"); + completion(nil, error); + } else { + [device readAttributeWithEndpointId:endpointId + clusterId:clusterId + attributeId:attributeId + params:[MTRDeviceController decodeXPCReadParams:params] + clientQueue:dispatch_get_main_queue() + completion:^(NSArray *> * _Nullable values, + NSError * _Nullable error) { + completion([MTRDeviceController encodeXPCResponseValues:values], error); + }]; + } + }]; } else { NSLog(@"Failed to get shared controller"); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); @@ -209,26 +210,27 @@ - (void)writeAttributeWithController:(id)controller (void) controller; __auto_type sharedController = sController; if (sharedController) { - [sharedController getBaseDevice:nodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - if (error) { - NSLog(@"Failed to get connected device"); - completion(nil, error); - } else { - - [device writeAttributeWithEndpointId:endpointId - clusterId:clusterId - attributeId:attributeId - value:value - timedWriteTimeout:timeoutMs - clientQueue:dispatch_get_main_queue() - completion:^(NSArray *> * _Nullable values, - NSError * _Nullable error) { - completion([MTRDeviceController encodeXPCResponseValues:values], error); - }]; - } - }]; + [sharedController + getBaseDevice:nodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + if (error) { + NSLog(@"Failed to get connected device"); + completion(nil, error); + } else { + + [device writeAttributeWithEndpointId:endpointId + clusterId:clusterId + attributeId:attributeId + value:value + timedWriteTimeout:timeoutMs + clientQueue:dispatch_get_main_queue() + completion:^(NSArray *> * _Nullable values, + NSError * _Nullable error) { + completion([MTRDeviceController encodeXPCResponseValues:values], error); + }]; + } + }]; } else { NSLog(@"Failed to get shared controller"); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); @@ -247,25 +249,26 @@ - (void)invokeCommandWithController:(id)controller (void) controller; __auto_type sharedController = sController; if (sharedController) { - [sharedController getBaseDevice:nodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - if (error) { - NSLog(@"Failed to get connected device"); - completion(nil, error); - } else { - [device invokeCommandWithEndpointId:endpointId - clusterId:clusterId - commandId:commandId - commandFields:fields - timedInvokeTimeout:nil - clientQueue:dispatch_get_main_queue() - completion:^(NSArray *> * _Nullable values, - NSError * _Nullable error) { - completion([MTRDeviceController encodeXPCResponseValues:values], error); - }]; - } - }]; + [sharedController + getBaseDevice:nodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + if (error) { + NSLog(@"Failed to get connected device"); + completion(nil, error); + } else { + [device invokeCommandWithEndpointId:endpointId + clusterId:clusterId + commandId:commandId + commandFields:fields + timedInvokeTimeout:nil + clientQueue:dispatch_get_main_queue() + completion:^(NSArray *> * _Nullable values, + NSError * _Nullable error) { + completion([MTRDeviceController encodeXPCResponseValues:values], error); + }]; + } + }]; } else { NSLog(@"Failed to get shared controller"); completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); @@ -284,39 +287,40 @@ - (void)subscribeAttributeWithController:(id)controller { __auto_type sharedController = sController; if (sharedController) { - [sharedController getBaseDevice:nodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - if (error) { - NSLog(@"Failed to get connected device"); - establishedHandler(); - // Send an error report so that the client knows of the failure - [self.clientProxy handleReportWithController:controller - nodeId:nodeId - values:nil - error:[NSError errorWithDomain:MTRErrorDomain - code:MTRErrorCodeGeneralError - userInfo:nil]]; - } else { - [device subscribeAttributeWithEndpointId:endpointId - clusterId:clusterId - attributeId:attributeId - minInterval:minInterval - maxInterval:maxInterval - params:[MTRDeviceController decodeXPCSubscribeParams:params] - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, - NSError * _Nullable error) { - [self.clientProxy - handleReportWithController:controller - nodeId:nodeId - values:[MTRDeviceController - encodeXPCResponseValues:values] - error:error]; - } - subscriptionEstablished:establishedHandler]; - } - }]; + [sharedController + getBaseDevice:nodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + if (error) { + NSLog(@"Failed to get connected device"); + establishedHandler(); + // Send an error report so that the client knows of the failure + [self.clientProxy handleReportWithController:controller + nodeId:nodeId + values:nil + error:[NSError errorWithDomain:MTRErrorDomain + code:MTRErrorCodeGeneralError + userInfo:nil]]; + } else { + [device subscribeAttributeWithEndpointId:endpointId + clusterId:clusterId + attributeId:attributeId + minInterval:minInterval + maxInterval:maxInterval + params:[MTRDeviceController decodeXPCSubscribeParams:params] + clientQueue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, + NSError * _Nullable error) { + [self.clientProxy + handleReportWithController:controller + nodeId:nodeId + values:[MTRDeviceController + encodeXPCResponseValues:values] + error:error]; + } + subscriptionEstablished:establishedHandler]; + } + }]; } else { NSLog(@"Failed to get shared controller"); establishedHandler(); @@ -336,13 +340,14 @@ - (void)stopReportsWithController:(id _Nullable)controller nodeId:(uint64_t)node if (sharedController) { [sharedController getBaseDevice:nodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - if (error) { - NSLog(@"Failed to get connected device"); - } else { - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() completion:completion]; - } - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + if (error) { + NSLog(@"Failed to get connected device"); + } else { + [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() + completion:completion]; + } + }]; } else { NSLog(@"Failed to get shared controller"); completion(); @@ -355,7 +360,7 @@ - (void)subscribeWithController:(id _Nullable)controller maxInterval:(NSNumber *)maxInterval params:(NSDictionary * _Nullable)params shouldCache:(BOOL)shouldCache - completion:(StatusCompletion)completion + completion:(MTRStatusCompletion)completion { __auto_type sharedController = sController; if (sharedController) { @@ -421,7 +426,7 @@ - (void)readAttributeCacheWithController:(id _Nullable)controller readAttributeWithEndpointID:endpointId clusterID:clusterId attributeID:attributeId - clientQueue:dispatch_get_main_queue() + queue:dispatch_get_main_queue() completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { completion([MTRDeviceController encodeXPCResponseValues:values], error); }]; @@ -557,12 +562,12 @@ - (void)initStack __block XCTestExpectation * connectionExpectation = [self expectationWithDescription:@"CASE established"]; [controller getBaseDevice:kDeviceId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertEqual(error.code, 0); - sDevice = device; - [connectionExpectation fulfill]; - connectionExpectation = nil; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertEqual(error.code, 0); + sDevice = device; + [connectionExpectation fulfill]; + connectionExpectation = nil; + }]; [self waitForExpectationsWithTimeout:kCASESetupTimeoutInSeconds handler:nil]; mSampleListener = [[MTRXPCListenerSample alloc] init]; @@ -601,10 +606,10 @@ - (void)waitForCommissionee }]; [remoteController getBaseDevice:kDeviceId queue:queue - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - mConnectedDevice = device; - [expectation fulfill]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + mConnectedDevice = device; + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; mDeviceController = remoteController; } @@ -633,7 +638,7 @@ - (void)test001_ReadAttribute clusterID:@29 attributeID:@0 params:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); @@ -676,7 +681,7 @@ - (void)test002_WriteAttribute attributeID:@17 value:writeValue timedWriteTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"write attribute: Brightness values: %@, error: %@", values, error); @@ -724,7 +729,7 @@ - (void)test003_InvokeCommand commandID:@4 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); @@ -768,7 +773,7 @@ - (void)test004_Subscribe minInterval:@2 maxInterval:@10 params:nil - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -811,7 +816,7 @@ - (void)test004_Subscribe commandID:@1 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -835,10 +840,10 @@ - (void)test004_Subscribe [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; XCTestExpectation * clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; } @@ -857,7 +862,7 @@ - (void)test005_ReadAttributeFailure clusterID:@10000 attributeID:@0 params:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); @@ -891,7 +896,7 @@ - (void)test006_WriteAttributeFailure attributeID:@10000 value:writeValue timedWriteTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"write attribute: Brightness values: %@, error: %@", values, error); @@ -933,7 +938,7 @@ - (void)test007_InvokeCommandFailure @"UnsignedInteger", @"type", [NSNumber numberWithUnsignedInteger:10], @"value", nil], @"value", nil], nil], @"value", nil]; - [device invokeCommandWithEndpointID:@1 clusterID:@8 commandID:@40000 commandFields:fields clientQueue:queue + [device invokeCommandWithEndpointID:@1 clusterID:@8 commandID:@40000 commandFields:fields queue:queue timedInvokeTimeout:nil completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); @@ -982,7 +987,7 @@ - (void)test008_SubscribeFailure minInterval:@2 maxInterval:@10 params:params - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); @@ -1019,7 +1024,7 @@ - (void)test009_ReadAttributeWithParams clusterID:@29 attributeID:@0 params:readParams - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"read attribute: DeviceType values: %@, error: %@", values, error); @@ -1054,10 +1059,10 @@ - (void)test010_SubscribeWithNoParams dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; __block void (^firstReportHandler)(id _Nullable values, NSError * _Nullable error) = nil; @@ -1071,7 +1076,7 @@ - (void)test010_SubscribeWithNoParams minInterval:@2 maxInterval:@10 params:nil - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1097,7 +1102,7 @@ - (void)test010_SubscribeWithNoParams minInterval:@2 maxInterval:@10 params:nil - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"2nd subscriber report attribute: CurrentLevel values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1123,7 +1128,7 @@ - (void)test010_SubscribeWithNoParams commandID:@0 commandFields:@{ @"type" : @"Structure", @"value" : @[] } timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1192,7 +1197,7 @@ - (void)test010_SubscribeWithNoParams commandID:@1 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1216,10 +1221,10 @@ - (void)test010_SubscribeWithNoParams [self waitForExpectations:@[ reportExpectation, secondReportExpectation ] timeout:kTimeoutInSeconds]; clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; } @@ -1233,10 +1238,10 @@ - (void)test011_SubscribeWithParams dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; __block void (^firstReportHandler)(id _Nullable values, NSError * _Nullable error) = nil; @@ -1250,7 +1255,7 @@ - (void)test011_SubscribeWithParams minInterval:@2 maxInterval:@10 params:nil - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1278,7 +1283,7 @@ - (void)test011_SubscribeWithParams minInterval:@2 maxInterval:@10 params:myParams - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"2nd subscriber report attribute: CurrentLevel values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1304,7 +1309,7 @@ - (void)test011_SubscribeWithParams commandID:@0 commandFields:@{ @"type" : @"Structure", @"value" : @[] } timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1373,7 +1378,7 @@ - (void)test011_SubscribeWithParams commandID:@1 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1397,17 +1402,17 @@ - (void)test011_SubscribeWithParams [self waitForExpectations:@[ reportExpectation, secondReportExpectation ] timeout:kTimeoutInSeconds]; clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; } @@ -1421,10 +1426,10 @@ - (void)test012_SubscribeKeepingPreviousSubscription dispatch_queue_t queue = dispatch_get_main_queue(); XCTestExpectation * clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; __block void (^firstReportHandler)(id _Nullable values, NSError * _Nullable error) = nil; @@ -1438,7 +1443,7 @@ - (void)test012_SubscribeKeepingPreviousSubscription minInterval:@2 maxInterval:@10 params:nil - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"report attribute: OnOff values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1466,7 +1471,7 @@ - (void)test012_SubscribeKeepingPreviousSubscription minInterval:@2 maxInterval:@10 params:myParams - clientQueue:queue + queue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"2nd subscriber report attribute: CurrentLevel values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1492,7 +1497,7 @@ - (void)test012_SubscribeKeepingPreviousSubscription commandID:@0 commandFields:@{ @"type" : @"Structure", @"value" : @[] } timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1559,7 +1564,7 @@ - (void)test012_SubscribeKeepingPreviousSubscription commandID:@1 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: On values: %@, error: %@", values, error); @@ -1583,10 +1588,10 @@ - (void)test012_SubscribeKeepingPreviousSubscription [self waitForExpectations:@[ reportExpectation, secondReportExpectation ] timeout:kTimeoutInSeconds]; clearExpectation = [self expectationWithDescription:@"report handlers deregistered"]; - [device deregisterReportHandlersWithClientQueue:queue - completion:^{ - [clearExpectation fulfill]; - }]; + [device deregisterReportHandlersWithQueue:queue + completion:^{ + [clearExpectation fulfill]; + }]; [self waitForExpectations:@[ clearExpectation ] timeout:kTimeoutInSeconds]; } @@ -1608,7 +1613,7 @@ - (void)test013_TimedWriteAttribute attributeID:@17 value:writeValue timedWriteTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"write attribute: Brightness values: %@, error: %@", values, error); @@ -1640,7 +1645,7 @@ - (void)test013_TimedWriteAttribute attributeID:@17 value:writeValue timedWriteTimeout:@1000 - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"Timed-write attribute: Brightness values: %@, error: %@", values, error); @@ -1673,7 +1678,7 @@ - (void)test013_TimedWriteAttribute minInterval:@2 maxInterval:@10 params:nil - clientQueue:queue + queue:queue reportHandler:^(id _Nullable value, NSError * _Nullable error) { NSLog(@"report attribute: Brightness values: %@, error: %@", value, error); @@ -1714,7 +1719,7 @@ - (void)test013_TimedWriteAttribute clusterID:@8 attributeID:@17 params:nil - clientQueue:queue + queue:queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { NSLog(@"read attribute: LevelControl Brightness values: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); @@ -1754,7 +1759,7 @@ - (void)test014_TimedInvokeCommand commandID:@4 commandFields:fields timedInvokeTimeout:@1000 - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); @@ -1823,7 +1828,7 @@ - (void)test900_SubscribeAttributeCache commandID:@0 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoked command: On values: %@, error: %@", values, error); @@ -1854,7 +1859,7 @@ - (void)test900_SubscribeAttributeCache commandID:@1 commandFields:fields timedInvokeTimeout:nil - clientQueue:queue + queue:queue completion:^(id _Nullable values, NSError * _Nullable error) { NSLog(@"invoked command: On values: %@, error: %@", values, error); @@ -1884,7 +1889,7 @@ - (void)test900_SubscribeAttributeCache readAttributeWithEndpointID:@1 clusterID:@6 attributeID:@0 - clientQueue:queue + queue:queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { NSLog(@"Cached attribute read: %@, error: %@", values, error); XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], 0); diff --git a/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m b/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m index 4faa53c7675330..3b6c24d627836a 100644 --- a/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m +++ b/src/darwin/Framework/CHIPTests/MTRXPCProtocolTests.m @@ -81,7 +81,7 @@ @interface MTRAttributeCacheContainer (Test) - (void)subscribeWithDeviceController:(MTRDeviceController *)deviceController deviceID:(NSNumber *)deviceID params:(MTRSubscribeParams * _Nullable)params - clientQueue:(dispatch_queue_t)clientQueue + queue:(dispatch_queue_t)queue completion:(void (^)(NSError * _Nullable error))completion; @end @@ -89,51 +89,52 @@ @implementation MTRAttributeCacheContainer (Test) - (void)subscribeWithDeviceController:(MTRDeviceController *)deviceController deviceID:(NSNumber *)deviceID params:(MTRSubscribeParams * _Nullable)params - clientQueue:clientQueue + queue:queue completion:(void (^)(NSError * _Nullable error))completion { __auto_type workQueue = dispatch_get_main_queue(); __auto_type completionHandler = ^(NSError * _Nullable error) { - dispatch_async(clientQueue, ^{ + dispatch_async(queue, ^{ completion(error); }); }; - [deviceController getBaseDevice:deviceID.unsignedLongLongValue - queue:workQueue - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - if (error) { - NSLog(@"Error: Failed to get connected device (%llu) for attribute cache: %@", - deviceID.unsignedLongLongValue, error); - completionHandler(error); - return; - } - __auto_type established = [NSMutableArray arrayWithCapacity:1]; - [established addObject:@NO]; - [device subscribeWithQueue:clientQueue - minInterval:@(1) - maxInterval:@(43200) - params:params - attributeCacheContainer:self - attributeReportHandler:^(NSArray * value) { - NSLog(@"Report received for attribute cache: %@", value); - } - eventReportHandler:nil - errorHandler:^(NSError * error) { - NSLog(@"Report error received for attribute cache: %@", error); - if (![established[0] boolValue]) { - established[0] = @YES; - completionHandler(error); - } - } - subscriptionEstablished:^() { - NSLog(@"Attribute cache subscription succeeded for device %llu", deviceID.unsignedLongLongValue); - if (![established[0] boolValue]) { - established[0] = @YES; - completionHandler(nil); - } - } - resubscriptionScheduled:nil]; - }]; + [deviceController + getBaseDevice:deviceID.unsignedLongLongValue + queue:workQueue + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + if (error) { + NSLog(@"Error: Failed to get connected device (%llu) for attribute cache: %@", deviceID.unsignedLongLongValue, + error); + completionHandler(error); + return; + } + __auto_type established = [NSMutableArray arrayWithCapacity:1]; + [established addObject:@NO]; + [device subscribeWithQueue:queue + minInterval:@(1) + maxInterval:@(43200) + params:params + attributeCacheContainer:self + attributeReportHandler:^(NSArray * value) { + NSLog(@"Report received for attribute cache: %@", value); + } + eventReportHandler:nil + errorHandler:^(NSError * error) { + NSLog(@"Report error received for attribute cache: %@", error); + if (![established[0] boolValue]) { + established[0] = @YES; + completionHandler(error); + } + } + subscriptionEstablished:^() { + NSLog(@"Attribute cache subscription succeeded for device %llu", deviceID.unsignedLongLongValue); + if (![established[0] boolValue]) { + established[0] = @YES; + completionHandler(nil); + } + } + resubscriptionScheduled:nil]; + }]; } @end @@ -292,7 +293,7 @@ - (void)subscribeWithController:(id _Nullable)controller maxInterval:(NSNumber *)maxInterval params:(NSDictionary * _Nullable)params shouldCache:(BOOL)shouldCache - completion:(StatusCompletion)completion + completion:(MTRStatusCompletion)completion { dispatch_async(dispatch_get_main_queue(), ^{ XCTAssertNotNil(self.handleSubscribeAll); @@ -371,25 +372,25 @@ - (void)testReadAttributeSuccess [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Reading..."); - [device readAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:nil - clientQueue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Read value: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myValues isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Reading..."); + [device readAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Read value: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myValues isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = + [self expectationWithDescription:@"XPC Disconnected"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -433,25 +434,25 @@ - (void)testReadAttributeWithParamsSuccess [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Reading..."); - [device readAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:myParams - clientQueue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Read value: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myValues isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Reading..."); + [device readAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:myParams + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Read value: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myValues isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = + [self expectationWithDescription:@"XPC Disconnected"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -486,24 +487,24 @@ - (void)testReadAttributeFailure [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Reading..."); - [device readAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:nil - clientQueue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Read value: %@", value); - XCTAssertNil(value); - XCTAssertNotNil(error); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Reading..."); + [device readAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Read value: %@", value); + XCTAssertNil(value); + XCTAssertNotNil(error); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = + [self expectationWithDescription:@"XPC Disconnected"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -545,26 +546,26 @@ - (void)testWriteAttributeSuccess [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Writing..."); - [device writeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - value:myValue - timedWriteTimeout:nil - clientQueue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Write response: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myResults isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Writing..."); + [device writeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + value:myValue + timedWriteTimeout:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Write response: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myResults isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = + [self expectationWithDescription:@"XPC Disconnected"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -608,26 +609,26 @@ - (void)testTimedWriteAttributeSuccess [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Writing..."); - [device writeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - value:myValue - timedWriteTimeout:myTimedWriteTimeout - clientQueue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Write response: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myResults isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Writing..."); + [device writeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + value:myValue + timedWriteTimeout:myTimedWriteTimeout + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Write response: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myResults isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = + [self expectationWithDescription:@"XPC Disconnected"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -664,25 +665,25 @@ - (void)testWriteAttributeFailure [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Writing..."); - [device writeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - value:myValue - timedWriteTimeout:nil - clientQueue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Write response: %@", value); - XCTAssertNil(value); - XCTAssertNotNil(error); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Writing..."); + [device writeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + value:myValue + timedWriteTimeout:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Write response: %@", value); + XCTAssertNil(value); + XCTAssertNotNil(error); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = + [self expectationWithDescription:@"XPC Disconnected"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -724,26 +725,26 @@ - (void)testInvokeCommandSuccess [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Invoking command..."); - [device invokeCommandWithEndpointID:myEndpointId - clusterID:myClusterId - commandID:myCommandId - commandFields:myFields - timedInvokeTimeout:nil - clientQueue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Command response: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myResults isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Invoking command..."); + [device invokeCommandWithEndpointID:myEndpointId + clusterID:myClusterId + commandID:myCommandId + commandFields:myFields + timedInvokeTimeout:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Command response: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myResults isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = + [self expectationWithDescription:@"XPC Disconnected"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -787,26 +788,26 @@ - (void)testTimedInvokeCommandSuccess [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Invoking command..."); - [device invokeCommandWithEndpointID:myEndpointId - clusterID:myClusterId - commandID:myCommandId - commandFields:myFields - timedInvokeTimeout:myTimedInvokeTimeout - clientQueue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Command response: %@", value); - XCTAssertNotNil(value); - XCTAssertNil(error); - XCTAssertTrue([myResults isEqual:value]); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Invoking command..."); + [device invokeCommandWithEndpointID:myEndpointId + clusterID:myClusterId + commandID:myCommandId + commandFields:myFields + timedInvokeTimeout:myTimedInvokeTimeout + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Command response: %@", value); + XCTAssertNotNil(value); + XCTAssertNil(error); + XCTAssertTrue([myResults isEqual:value]); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = + [self expectationWithDescription:@"XPC Disconnected"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -846,25 +847,25 @@ - (void)testInvokeCommandFailure [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Invoking command..."); - [device invokeCommandWithEndpointID:myEndpointId - clusterID:myClusterId - commandID:myCommandId - commandFields:myFields - timedInvokeTimeout:nil - clientQueue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Command response: %@", value); - XCTAssertNil(value); - XCTAssertNotNil(error); - [responseExpectation fulfill]; - self.xpcDisconnectExpectation = - [self expectationWithDescription:@"XPC Disconnected"]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Invoking command..."); + [device invokeCommandWithEndpointID:myEndpointId + clusterID:myClusterId + commandID:myCommandId + commandFields:myFields + timedInvokeTimeout:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Command response: %@", value); + XCTAssertNil(value); + XCTAssertNotNil(error); + [responseExpectation fulfill]; + self.xpcDisconnectExpectation = + [self expectationWithDescription:@"XPC Disconnected"]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, responseExpectation, nil] timeout:kTimeoutInSeconds]; @@ -910,30 +911,30 @@ - (void)testSubscribeAttributeSuccess _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + minInterval:myMinInterval + maxInterval:myMaxInterval + params:nil + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -975,13 +976,13 @@ - (void)testSubscribeAttributeSuccess // Deregister report handler [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1030,30 +1031,30 @@ - (void)testSubscribeAttributeWithParamsSuccess _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:myParams - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + minInterval:myMinInterval + maxInterval:myMaxInterval + params:myParams + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1095,13 +1096,13 @@ - (void)testSubscribeAttributeWithParamsSuccess // Deregister report handler [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1145,30 +1146,30 @@ - (void)testBadlyFormattedReport _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + minInterval:myMinInterval + maxInterval:myMaxInterval + params:nil + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1208,13 +1209,13 @@ - (void)testBadlyFormattedReport _xpcDisconnectExpectation.inverted = NO; [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1259,30 +1260,30 @@ - (void)testReportWithUnrelatedEndpointId _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + minInterval:myMinInterval + maxInterval:myMaxInterval + params:nil + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1324,13 +1325,13 @@ - (void)testReportWithUnrelatedEndpointId // Deregister report handler [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1375,30 +1376,30 @@ - (void)testReportWithUnrelatedClusterId _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + minInterval:myMinInterval + maxInterval:myMaxInterval + params:nil + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1440,13 +1441,13 @@ - (void)testReportWithUnrelatedClusterId // Deregister report handler [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1491,30 +1492,30 @@ - (void)testReportWithUnrelatedAttributeId _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + minInterval:myMinInterval + maxInterval:myMaxInterval + params:nil + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1556,13 +1557,13 @@ - (void)testReportWithUnrelatedAttributeId // Deregister report handler [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1607,30 +1608,30 @@ - (void)testReportWithUnrelatedNode _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + minInterval:myMinInterval + maxInterval:myMaxInterval + params:nil + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1672,13 +1673,13 @@ - (void)testReportWithUnrelatedNode // Deregister report handler [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1722,30 +1723,30 @@ - (void)testSubscribeMultiEndpoints _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:nil - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributeWithEndpointID:nil + clusterID:myClusterId + attributeID:myAttributeId + minInterval:myMinInterval + maxInterval:myMaxInterval + params:nil + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1787,13 +1788,13 @@ - (void)testSubscribeMultiEndpoints // Deregister report handler [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1837,30 +1838,30 @@ - (void)testSubscribeMultiClusters _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:nil - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributeWithEndpointID:myEndpointId + clusterID:nil + attributeID:myAttributeId + minInterval:myMinInterval + maxInterval:myMaxInterval + params:nil + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -1902,13 +1903,13 @@ - (void)testSubscribeMultiClusters // Deregister report handler [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -1952,30 +1953,30 @@ - (void)testSubscribeMultiAttributes _xpcDisconnectExpectation = [self expectationWithDescription:@"XPC Disconnected"]; [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:nil - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Report value: %@", values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReport isEqual:values]); - [reportExpectation fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:nil + minInterval:myMinInterval + maxInterval:myMaxInterval + params:nil + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Report value: %@", values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReport isEqual:values]); + [reportExpectation fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; @@ -2017,13 +2018,13 @@ - (void)testSubscribeMultiAttributes // Deregister report handler [_remoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + }]; + }]; // Wait for disconnection [self waitForExpectations:@[ _xpcDisconnectExpectation, stopExpectation ] timeout:kTimeoutInSeconds]; @@ -2078,30 +2079,30 @@ - (void)testMutiSubscriptions callExpectation = [self expectationWithDescription:[NSString stringWithFormat:@"XPC call (%u) received", i]]; establishExpectation = [self expectationWithDescription:[NSString stringWithFormat:@"Established (%u) called", i]]; [_remoteDeviceController - getBaseDevice:myNodeId - queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Subscribing..."); - [device subscribeAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - minInterval:myMinInterval - maxInterval:myMaxInterval - params:nil - clientQueue:dispatch_get_main_queue() - reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - NSLog(@"Subscriber [%d] report value: %@", i, values); - XCTAssertNotNil(values); - XCTAssertNil(error); - XCTAssertTrue([myReports[i] isEqual:values]); - [reportExpectations[i] fulfill]; - } - subscriptionEstablished:^{ - [establishExpectation fulfill]; - }]; - }]; + getBaseDevice:myNodeId + queue:dispatch_get_main_queue() + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Subscribing..."); + [device subscribeAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + minInterval:myMinInterval + maxInterval:myMaxInterval + params:nil + queue:dispatch_get_main_queue() + reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + NSLog(@"Subscriber [%d] report value: %@", i, values); + XCTAssertNotNil(values); + XCTAssertNil(error); + XCTAssertTrue([myReports[i] isEqual:values]); + [reportExpectations[i] fulfill]; + } + subscriptionEstablished:^{ + [establishExpectation fulfill]; + }]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:callExpectation, establishExpectation, nil] timeout:kTimeoutInSeconds]; } @@ -2154,14 +2155,14 @@ - (void)testMutiSubscriptions __auto_type deregisterExpectation = [self expectationWithDescription:@"First subscriber deregistered"]; [_remoteDeviceController getBaseDevice:nodeToStop queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - [deregisterExpectation fulfill]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + [deregisterExpectation fulfill]; + }]; + }]; [self waitForExpectations:@[ stopExpectation, deregisterExpectation ] timeout:kTimeoutInSeconds]; @@ -2212,14 +2213,14 @@ - (void)testMutiSubscriptions __auto_type secondDeregisterExpectation = [self expectationWithDescription:@"Second subscriber deregistered"]; [_remoteDeviceController getBaseDevice:nodeToStop queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - NSLog(@"Device acquired. Deregistering..."); - [device deregisterReportHandlersWithClientQueue:dispatch_get_main_queue() - completion:^{ - NSLog(@"Deregistered"); - [secondDeregisterExpectation fulfill]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + NSLog(@"Device acquired. Deregistering..."); + [device deregisterReportHandlersWithQueue:dispatch_get_main_queue() + completion:^{ + NSLog(@"Deregistered"); + [secondDeregisterExpectation fulfill]; + }]; + }]; // Wait for deregistration and disconnection [self waitForExpectations:@[ secondDeregisterExpectation, _xpcDisconnectExpectation, stopExpectation ] @@ -2282,11 +2283,11 @@ - (void)testAnySharedRemoteController __auto_type deviceAcquired = [self expectationWithDescription:@"Connected device was acquired"]; [unspecifiedRemoteDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - [deviceAcquired fulfill]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + [deviceAcquired fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObjects:anySharedRemoteControllerCallExpectation, deviceAcquired, nil] timeout:kTimeoutInSeconds]; @@ -2314,7 +2315,7 @@ - (void)testSubscribeAttributeCacheSuccess [attributeCacheContainer subscribeWithDeviceController:_remoteDeviceController deviceID:@(myNodeId) params:nil - clientQueue:dispatch_get_main_queue() + queue:dispatch_get_main_queue() completion:^(NSError * _Nullable error) { NSLog(@"Subscribe completion called with error: %@", error); XCTAssertNil(error); @@ -2352,7 +2353,7 @@ - (void)testSubscribeAttributeCacheWithParamsSuccess [attributeCacheContainer subscribeWithDeviceController:_remoteDeviceController deviceID:@(myNodeId) params:myParams - clientQueue:dispatch_get_main_queue() + queue:dispatch_get_main_queue() completion:^(NSError * _Nullable error) { NSLog(@"Subscribe completion called with error: %@", error); XCTAssertNil(error); @@ -2386,7 +2387,7 @@ - (void)testSubscribeAttributeCacheFailure [attributeCacheContainer subscribeWithDeviceController:_remoteDeviceController deviceID:@(myNodeId) params:nil - clientQueue:dispatch_get_main_queue() + queue:dispatch_get_main_queue() completion:^(NSError * _Nullable error) { NSLog(@"Subscribe completion called with error: %@", error); XCTAssertNotNil(error); @@ -2442,7 +2443,7 @@ - (void)testReadAttributeCacheSuccess [attributeCacheContainer subscribeWithDeviceController:_remoteDeviceController deviceID:@(myNodeId) params:nil - clientQueue:dispatch_get_main_queue() + queue:dispatch_get_main_queue() completion:^(NSError * _Nullable error) { NSLog(@"Subscribe completion called with error: %@", error); XCTAssertNil(error); @@ -2455,7 +2456,7 @@ - (void)testReadAttributeCacheSuccess readAttributeWithEndpointID:myEndpointId clusterID:myClusterId attributeID:myAttributeId - clientQueue:dispatch_get_main_queue() + queue:dispatch_get_main_queue() completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { NSLog(@"Read cached value: %@", values); XCTAssertNotNil(values); @@ -2504,7 +2505,7 @@ - (void)testReadAttributeCacheFailure [attributeCacheContainer subscribeWithDeviceController:_remoteDeviceController deviceID:@(myNodeId) params:nil - clientQueue:dispatch_get_main_queue() + queue:dispatch_get_main_queue() completion:^(NSError * _Nullable error) { NSLog(@"Subscribe completion called with error: %@", error); XCTAssertNil(error); @@ -2517,7 +2518,7 @@ - (void)testReadAttributeCacheFailure readAttributeWithEndpointID:myEndpointId clusterID:myClusterId attributeID:myAttributeId - clientQueue:dispatch_get_main_queue() + queue:dispatch_get_main_queue() completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { NSLog(@"Read cached value: %@", values); XCTAssertNil(values); @@ -2544,22 +2545,22 @@ - (void)testXPCConnectionFailure [failingDeviceController getBaseDevice:myNodeId queue:dispatch_get_main_queue() - completionHandler:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { - XCTAssertNotNil(device); - XCTAssertNil(error); - NSLog(@"Device acquired. Reading..."); - [device readAttributeWithEndpointID:myEndpointId - clusterID:myClusterId - attributeID:myAttributeId - params:nil - clientQueue:dispatch_get_main_queue() - completion:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"Read value: %@", value); - XCTAssertNil(value); - XCTAssertNotNil(error); - [responseExpectation fulfill]; - }]; - }]; + completion:^(MTRBaseDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Reading..."); + [device readAttributeWithEndpointID:myEndpointId + clusterID:myClusterId + attributeID:myAttributeId + params:nil + queue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Read value: %@", value); + XCTAssertNil(value); + XCTAssertNotNil(error); + [responseExpectation fulfill]; + }]; + }]; [self waitForExpectations:@[ responseExpectation ] timeout:kTimeoutInSeconds]; } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 262242fded36f8..6bde393e4a223a 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -155,16 +155,16 @@ class IdentifyIdentify : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster identifyWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -203,16 +203,16 @@ class IdentifyTriggerEffect : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -241,7 +241,7 @@ class ReadIdentifyIdentifyTime : public ReadAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyTime response %@", [value description]); if (error != nil) { LogNSError("Identify IdentifyTime read Error", error); @@ -279,12 +279,12 @@ class WriteIdentifyIdentifyTime : public WriteAttribute { [cluster writeAttributeIdentifyTimeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Identify IdentifyTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Identify IdentifyTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -347,7 +347,7 @@ class ReadIdentifyIdentifyType : public ReadAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeIdentifyTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeIdentifyTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyType response %@", [value description]); if (error != nil) { LogNSError("Identify IdentifyType read Error", error); @@ -413,7 +413,7 @@ class ReadIdentifyGeneratedCommandList : public ReadAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Identify GeneratedCommandList read Error", error); @@ -479,7 +479,7 @@ class ReadIdentifyAcceptedCommandList : public ReadAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Identify AcceptedCommandList read Error", error); @@ -545,7 +545,7 @@ class ReadIdentifyAttributeList : public ReadAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Identify AttributeList read Error", error); @@ -611,7 +611,7 @@ class ReadIdentifyFeatureMap : public ReadAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Identify FeatureMap read Error", error); @@ -677,7 +677,7 @@ class ReadIdentifyClusterRevision : public ReadAttribute { MTRBaseClusterIdentify * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Identify ClusterRevision read Error", error); @@ -777,17 +777,17 @@ class GroupsAddGroup : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster addGroupWithParams:params - completionHandler:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -824,17 +824,17 @@ class GroupsViewGroup : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -880,18 +880,18 @@ class GroupsGetGroupMembership : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getGroupMembershipWithParams:params - completionHandler:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -930,17 +930,17 @@ class GroupsRemoveGroup : public ClusterCommand { while (repeatCount--) { [cluster removeGroupWithParams:params - completionHandler:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -975,16 +975,16 @@ class GroupsRemoveAllGroups : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster removeAllGroupsWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1024,16 +1024,16 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster addGroupIfIdentifyingWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1062,7 +1062,7 @@ class ReadGroupsNameSupport : public ReadAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNameSupportWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.NameSupport response %@", [value description]); if (error != nil) { LogNSError("Groups NameSupport read Error", error); @@ -1128,7 +1128,7 @@ class ReadGroupsGeneratedCommandList : public ReadAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Groups GeneratedCommandList read Error", error); @@ -1194,7 +1194,7 @@ class ReadGroupsAcceptedCommandList : public ReadAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Groups AcceptedCommandList read Error", error); @@ -1260,7 +1260,7 @@ class ReadGroupsAttributeList : public ReadAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Groups AttributeList read Error", error); @@ -1326,7 +1326,7 @@ class ReadGroupsFeatureMap : public ReadAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Groups FeatureMap read Error", error); @@ -1392,7 +1392,7 @@ class ReadGroupsClusterRevision : public ReadAttribute { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Groups ClusterRevision read Error", error); @@ -1540,17 +1540,17 @@ class ScenesAddScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster addSceneWithParams:params - completionHandler:^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1591,17 +1591,17 @@ class ScenesViewScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster viewSceneWithParams:params - completionHandler:^(MTRScenesClusterViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRScenesClusterViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1641,17 +1641,17 @@ class ScenesRemoveScene : public ClusterCommand { while (repeatCount--) { [cluster removeSceneWithParams:params - completionHandler:^(MTRScenesClusterRemoveSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRScenesClusterRemoveSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1688,18 +1688,18 @@ class ScenesRemoveAllScenes : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster removeAllScenesWithParams:params - completionHandler:^( - MTRScenesClusterRemoveAllScenesResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1739,17 +1739,17 @@ class ScenesStoreScene : public ClusterCommand { while (repeatCount--) { [cluster storeSceneWithParams:params - completionHandler:^(MTRScenesClusterStoreSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRScenesClusterStoreSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1798,16 +1798,16 @@ class ScenesRecallScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster recallSceneWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1844,18 +1844,18 @@ class ScenesGetSceneMembership : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getSceneMembershipWithParams:params - completionHandler:^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1935,18 +1935,18 @@ class ScenesEnhancedAddScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedAddSceneWithParams:params - completionHandler:^( - MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1987,18 +1987,18 @@ class ScenesEnhancedViewScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedViewSceneWithParams:params - completionHandler:^( - MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2043,17 +2043,17 @@ class ScenesCopyScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster copySceneWithParams:params - completionHandler:^(MTRScenesClusterCopySceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRScenesClusterCopySceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2082,7 +2082,7 @@ class ReadScenesSceneCount : public ReadAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSceneCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSceneCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneCount response %@", [value description]); if (error != nil) { LogNSError("Scenes SceneCount read Error", error); @@ -2148,7 +2148,7 @@ class ReadScenesCurrentScene : public ReadAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentSceneWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentSceneWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentScene response %@", [value description]); if (error != nil) { LogNSError("Scenes CurrentScene read Error", error); @@ -2214,7 +2214,7 @@ class ReadScenesCurrentGroup : public ReadAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentGroupWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentGroupWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentGroup response %@", [value description]); if (error != nil) { LogNSError("Scenes CurrentGroup read Error", error); @@ -2280,7 +2280,7 @@ class ReadScenesSceneValid : public ReadAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSceneValidWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSceneValidWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneValid response %@", [value description]); if (error != nil) { LogNSError("Scenes SceneValid read Error", error); @@ -2346,7 +2346,7 @@ class ReadScenesNameSupport : public ReadAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNameSupportWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.NameSupport response %@", [value description]); if (error != nil) { LogNSError("Scenes NameSupport read Error", error); @@ -2412,7 +2412,7 @@ class ReadScenesLastConfiguredBy : public ReadAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastConfiguredByWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLastConfiguredByWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.LastConfiguredBy response %@", [value description]); if (error != nil) { LogNSError("Scenes LastConfiguredBy read Error", error); @@ -2478,7 +2478,7 @@ class ReadScenesGeneratedCommandList : public ReadAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Scenes GeneratedCommandList read Error", error); @@ -2544,7 +2544,7 @@ class ReadScenesAcceptedCommandList : public ReadAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Scenes AcceptedCommandList read Error", error); @@ -2610,7 +2610,7 @@ class ReadScenesAttributeList : public ReadAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Scenes AttributeList read Error", error); @@ -2676,7 +2676,7 @@ class ReadScenesFeatureMap : public ReadAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Scenes FeatureMap read Error", error); @@ -2742,7 +2742,7 @@ class ReadScenesClusterRevision : public ReadAttribute { MTRBaseClusterScenes * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Scenes ClusterRevision read Error", error); @@ -2840,16 +2840,16 @@ class OnOffOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster offWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2883,16 +2883,16 @@ class OnOffOn : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster onWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2926,16 +2926,16 @@ class OnOffToggle : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster toggleWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2973,16 +2973,16 @@ class OnOffOffWithEffect : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster offWithEffectWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -3017,16 +3017,16 @@ class OnOffOnWithRecallGlobalScene : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster onWithRecallGlobalSceneWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -3066,16 +3066,16 @@ class OnOffOnWithTimedOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster onWithTimedOffWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -3104,7 +3104,7 @@ class ReadOnOffOnOff : public ReadAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnOff response %@", [value description]); if (error != nil) { LogNSError("OnOff OnOff read Error", error); @@ -3170,7 +3170,7 @@ class ReadOnOffGlobalSceneControl : public ReadAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGlobalSceneControlWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); if (error != nil) { LogNSError("OnOff GlobalSceneControl read Error", error); @@ -3236,7 +3236,7 @@ class ReadOnOffOnTime : public ReadAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOnTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnTime response %@", [value description]); if (error != nil) { LogNSError("OnOff OnTime read Error", error); @@ -3274,12 +3274,12 @@ class WriteOnOffOnTime : public WriteAttribute { [cluster writeAttributeOnTimeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOff OnTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OnOff OnTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -3342,7 +3342,7 @@ class ReadOnOffOffWaitTime : public ReadAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOffWaitTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OffWaitTime response %@", [value description]); if (error != nil) { LogNSError("OnOff OffWaitTime read Error", error); @@ -3380,12 +3380,12 @@ class WriteOnOffOffWaitTime : public WriteAttribute { [cluster writeAttributeOffWaitTimeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOff OffWaitTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OnOff OffWaitTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -3448,7 +3448,7 @@ class ReadOnOffStartUpOnOff : public ReadAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStartUpOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.StartUpOnOff response %@", [value description]); if (error != nil) { LogNSError("OnOff StartUpOnOff read Error", error); @@ -3486,12 +3486,12 @@ class WriteOnOffStartUpOnOff : public WriteAttribute { [cluster writeAttributeStartUpOnOffWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOff StartUpOnOff write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OnOff StartUpOnOff write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -3554,7 +3554,7 @@ class ReadOnOffGeneratedCommandList : public ReadAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("OnOff GeneratedCommandList read Error", error); @@ -3620,7 +3620,7 @@ class ReadOnOffAcceptedCommandList : public ReadAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("OnOff AcceptedCommandList read Error", error); @@ -3686,7 +3686,7 @@ class ReadOnOffAttributeList : public ReadAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AttributeList response %@", [value description]); if (error != nil) { LogNSError("OnOff AttributeList read Error", error); @@ -3752,7 +3752,7 @@ class ReadOnOffFeatureMap : public ReadAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("OnOff FeatureMap read Error", error); @@ -3818,7 +3818,7 @@ class ReadOnOffClusterRevision : public ReadAttribute { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("OnOff ClusterRevision read Error", error); @@ -3900,7 +3900,7 @@ class ReadOnOffSwitchConfigurationSwitchType : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSwitchTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSwitchTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration SwitchType read Error", error); @@ -3964,7 +3964,7 @@ class ReadOnOffSwitchConfigurationSwitchActions : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSwitchActionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSwitchActionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration SwitchActions read Error", error); @@ -4001,12 +4001,12 @@ class WriteOnOffSwitchConfigurationSwitchActions : public WriteAttribute { [cluster writeAttributeSwitchActionsWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOffSwitchConfiguration SwitchActions write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OnOffSwitchConfiguration SwitchActions write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -4067,7 +4067,7 @@ class ReadOnOffSwitchConfigurationGeneratedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration GeneratedCommandList read Error", error); @@ -4131,7 +4131,7 @@ class ReadOnOffSwitchConfigurationAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration AcceptedCommandList read Error", error); @@ -4195,7 +4195,7 @@ class ReadOnOffSwitchConfigurationAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration AttributeList read Error", error); @@ -4259,7 +4259,7 @@ class ReadOnOffSwitchConfigurationFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration FeatureMap read Error", error); @@ -4323,7 +4323,7 @@ class ReadOnOffSwitchConfigurationClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOnOffSwitchConfiguration * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("OnOffSwitchConfiguration ClusterRevision read Error", error); @@ -4444,16 +4444,16 @@ class LevelControlMoveToLevel : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4500,16 +4500,16 @@ class LevelControlMove : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4558,16 +4558,16 @@ class LevelControlStep : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4606,16 +4606,16 @@ class LevelControlStop : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4662,16 +4662,16 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToLevelWithOnOffWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4718,16 +4718,16 @@ class LevelControlMoveWithOnOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveWithOnOffWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4776,16 +4776,16 @@ class LevelControlStepWithOnOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepWithOnOffWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4824,16 +4824,16 @@ class LevelControlStopWithOnOff : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopWithOnOffWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4870,16 +4870,16 @@ class LevelControlMoveToClosestFrequency : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToClosestFrequencyWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -4908,7 +4908,7 @@ class ReadLevelControlCurrentLevel : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentLevel response %@", [value description]); if (error != nil) { LogNSError("LevelControl CurrentLevel read Error", error); @@ -4974,7 +4974,7 @@ class ReadLevelControlRemainingTime : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.RemainingTime response %@", [value description]); if (error != nil) { LogNSError("LevelControl RemainingTime read Error", error); @@ -5040,7 +5040,7 @@ class ReadLevelControlMinLevel : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinLevel response %@", [value description]); if (error != nil) { LogNSError("LevelControl MinLevel read Error", error); @@ -5106,7 +5106,7 @@ class ReadLevelControlMaxLevel : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxLevel response %@", [value description]); if (error != nil) { LogNSError("LevelControl MaxLevel read Error", error); @@ -5172,7 +5172,7 @@ class ReadLevelControlCurrentFrequency : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentFrequency response %@", [value description]); if (error != nil) { LogNSError("LevelControl CurrentFrequency read Error", error); @@ -5238,7 +5238,7 @@ class ReadLevelControlMinFrequency : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinFrequency response %@", [value description]); if (error != nil) { LogNSError("LevelControl MinFrequency read Error", error); @@ -5304,7 +5304,7 @@ class ReadLevelControlMaxFrequency : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxFrequency response %@", [value description]); if (error != nil) { LogNSError("LevelControl MaxFrequency read Error", error); @@ -5370,7 +5370,7 @@ class ReadLevelControlOptions : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.Options response %@", [value description]); if (error != nil) { LogNSError("LevelControl Options read Error", error); @@ -5408,12 +5408,12 @@ class WriteLevelControlOptions : public WriteAttribute { [cluster writeAttributeOptionsWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl Options write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl Options write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5476,7 +5476,7 @@ class ReadLevelControlOnOffTransitionTime : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnOffTransitionTime response %@", [value description]); if (error != nil) { LogNSError("LevelControl OnOffTransitionTime read Error", error); @@ -5514,12 +5514,12 @@ class WriteLevelControlOnOffTransitionTime : public WriteAttribute { [cluster writeAttributeOnOffTransitionTimeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl OnOffTransitionTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl OnOffTransitionTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5582,7 +5582,7 @@ class ReadLevelControlOnLevel : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnLevel response %@", [value description]); if (error != nil) { LogNSError("LevelControl OnLevel read Error", error); @@ -5620,12 +5620,12 @@ class WriteLevelControlOnLevel : public WriteAttribute { [cluster writeAttributeOnLevelWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl OnLevel write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl OnLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5688,7 +5688,7 @@ class ReadLevelControlOnTransitionTime : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnTransitionTime response %@", [value description]); if (error != nil) { LogNSError("LevelControl OnTransitionTime read Error", error); @@ -5726,12 +5726,12 @@ class WriteLevelControlOnTransitionTime : public WriteAttribute { [cluster writeAttributeOnTransitionTimeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl OnTransitionTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl OnTransitionTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5794,7 +5794,7 @@ class ReadLevelControlOffTransitionTime : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OffTransitionTime response %@", [value description]); if (error != nil) { LogNSError("LevelControl OffTransitionTime read Error", error); @@ -5832,12 +5832,12 @@ class WriteLevelControlOffTransitionTime : public WriteAttribute { [cluster writeAttributeOffTransitionTimeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl OffTransitionTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl OffTransitionTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -5900,7 +5900,7 @@ class ReadLevelControlDefaultMoveRate : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.DefaultMoveRate response %@", [value description]); if (error != nil) { LogNSError("LevelControl DefaultMoveRate read Error", error); @@ -5938,12 +5938,12 @@ class WriteLevelControlDefaultMoveRate : public WriteAttribute { [cluster writeAttributeDefaultMoveRateWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl DefaultMoveRate write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl DefaultMoveRate write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -6006,7 +6006,7 @@ class ReadLevelControlStartUpCurrentLevel : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.StartUpCurrentLevel response %@", [value description]); if (error != nil) { LogNSError("LevelControl StartUpCurrentLevel read Error", error); @@ -6044,12 +6044,12 @@ class WriteLevelControlStartUpCurrentLevel : public WriteAttribute { [cluster writeAttributeStartUpCurrentLevelWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LevelControl StartUpCurrentLevel write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LevelControl StartUpCurrentLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -6112,7 +6112,7 @@ class ReadLevelControlGeneratedCommandList : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("LevelControl GeneratedCommandList read Error", error); @@ -6178,7 +6178,7 @@ class ReadLevelControlAcceptedCommandList : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("LevelControl AcceptedCommandList read Error", error); @@ -6244,7 +6244,7 @@ class ReadLevelControlAttributeList : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("LevelControl AttributeList read Error", error); @@ -6310,7 +6310,7 @@ class ReadLevelControlFeatureMap : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("LevelControl FeatureMap read Error", error); @@ -6376,7 +6376,7 @@ class ReadLevelControlClusterRevision : public ReadAttribute { MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("LevelControl ClusterRevision read Error", error); @@ -6466,7 +6466,7 @@ class ReadBinaryInputBasicActiveText : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveTextWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ActiveText response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic ActiveText read Error", error); @@ -6506,12 +6506,12 @@ class WriteBinaryInputBasicActiveText : public WriteAttribute { [cluster writeAttributeActiveTextWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic ActiveText write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic ActiveText write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -6574,7 +6574,7 @@ class ReadBinaryInputBasicDescription : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Description response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic Description read Error", error); @@ -6614,12 +6614,12 @@ class WriteBinaryInputBasicDescription : public WriteAttribute { [cluster writeAttributeDescriptionWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic Description write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic Description write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -6682,7 +6682,7 @@ class ReadBinaryInputBasicInactiveText : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInactiveTextWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInactiveTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.InactiveText response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic InactiveText read Error", error); @@ -6722,12 +6722,12 @@ class WriteBinaryInputBasicInactiveText : public WriteAttribute { [cluster writeAttributeInactiveTextWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic InactiveText write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic InactiveText write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -6790,7 +6790,7 @@ class ReadBinaryInputBasicOutOfService : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOutOfServiceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOutOfServiceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.OutOfService response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic OutOfService read Error", error); @@ -6828,12 +6828,12 @@ class WriteBinaryInputBasicOutOfService : public WriteAttribute { [cluster writeAttributeOutOfServiceWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic OutOfService write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic OutOfService write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -6896,7 +6896,7 @@ class ReadBinaryInputBasicPolarity : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePolarityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePolarityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Polarity response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic Polarity read Error", error); @@ -6962,7 +6962,7 @@ class ReadBinaryInputBasicPresentValue : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePresentValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePresentValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.PresentValue response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic PresentValue read Error", error); @@ -7000,12 +7000,12 @@ class WriteBinaryInputBasicPresentValue : public WriteAttribute { [cluster writeAttributePresentValueWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic PresentValue write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic PresentValue write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -7068,7 +7068,7 @@ class ReadBinaryInputBasicReliability : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReliabilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeReliabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Reliability response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic Reliability read Error", error); @@ -7106,12 +7106,12 @@ class WriteBinaryInputBasicReliability : public WriteAttribute { [cluster writeAttributeReliabilityWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic Reliability write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BinaryInputBasic Reliability write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -7174,7 +7174,7 @@ class ReadBinaryInputBasicStatusFlags : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStatusFlagsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStatusFlagsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.StatusFlags response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic StatusFlags read Error", error); @@ -7240,7 +7240,7 @@ class ReadBinaryInputBasicApplicationType : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApplicationTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeApplicationTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ApplicationType response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic ApplicationType read Error", error); @@ -7306,7 +7306,7 @@ class ReadBinaryInputBasicGeneratedCommandList : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic GeneratedCommandList read Error", error); @@ -7372,7 +7372,7 @@ class ReadBinaryInputBasicAcceptedCommandList : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic AcceptedCommandList read Error", error); @@ -7438,7 +7438,7 @@ class ReadBinaryInputBasicAttributeList : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AttributeList response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic AttributeList read Error", error); @@ -7504,7 +7504,7 @@ class ReadBinaryInputBasicFeatureMap : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic FeatureMap read Error", error); @@ -7570,7 +7570,7 @@ class ReadBinaryInputBasicClusterRevision : public ReadAttribute { MTRBaseClusterBinaryInputBasic * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("BinaryInputBasic ClusterRevision read Error", error); @@ -7655,7 +7655,7 @@ class ReadDescriptorDeviceTypeList : public ReadAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDeviceListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDeviceTypeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.DeviceTypeList response %@", [value description]); if (error != nil) { LogNSError("Descriptor DeviceTypeList read Error", error); @@ -7721,7 +7721,7 @@ class ReadDescriptorServerList : public ReadAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeServerListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ServerList response %@", [value description]); if (error != nil) { LogNSError("Descriptor ServerList read Error", error); @@ -7787,7 +7787,7 @@ class ReadDescriptorClientList : public ReadAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClientListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClientListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClientList response %@", [value description]); if (error != nil) { LogNSError("Descriptor ClientList read Error", error); @@ -7853,7 +7853,7 @@ class ReadDescriptorPartsList : public ReadAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartsListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePartsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.PartsList response %@", [value description]); if (error != nil) { LogNSError("Descriptor PartsList read Error", error); @@ -7919,7 +7919,7 @@ class ReadDescriptorGeneratedCommandList : public ReadAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Descriptor GeneratedCommandList read Error", error); @@ -7985,7 +7985,7 @@ class ReadDescriptorAcceptedCommandList : public ReadAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Descriptor AcceptedCommandList read Error", error); @@ -8051,7 +8051,7 @@ class ReadDescriptorAttributeList : public ReadAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Descriptor AttributeList read Error", error); @@ -8117,7 +8117,7 @@ class ReadDescriptorFeatureMap : public ReadAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Descriptor FeatureMap read Error", error); @@ -8183,7 +8183,7 @@ class ReadDescriptorClusterRevision : public ReadAttribute { MTRBaseClusterDescriptor * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Descriptor ClusterRevision read Error", error); @@ -8268,13 +8268,13 @@ class ReadBindingBinding : public ReadAttribute { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeBindingWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.Binding response %@", [value description]); - if (error != nil) { - LogNSError("Binding Binding read Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.Binding response %@", [value description]); + if (error != nil) { + LogNSError("Binding Binding read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -8337,12 +8337,12 @@ class WriteBindingBinding : public WriteAttribute { [cluster writeAttributeBindingWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Binding Binding write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Binding Binding write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -8406,7 +8406,7 @@ class ReadBindingGeneratedCommandList : public ReadAttribute { MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Binding GeneratedCommandList read Error", error); @@ -8472,7 +8472,7 @@ class ReadBindingAcceptedCommandList : public ReadAttribute { MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Binding AcceptedCommandList read Error", error); @@ -8538,7 +8538,7 @@ class ReadBindingAttributeList : public ReadAttribute { MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Binding AttributeList read Error", error); @@ -8604,7 +8604,7 @@ class ReadBindingFeatureMap : public ReadAttribute { MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Binding FeatureMap read Error", error); @@ -8670,7 +8670,7 @@ class ReadBindingClusterRevision : public ReadAttribute { MTRBaseClusterBinding * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Binding ClusterRevision read Error", error); @@ -8761,13 +8761,13 @@ class ReadAccessControlAcl : public ReadAttribute { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeAclWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.Acl response %@", [value description]); - if (error != nil) { - LogNSError("AccessControl Acl read Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.Acl response %@", [value description]); + if (error != nil) { + LogNSError("AccessControl Acl read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -8853,12 +8853,12 @@ class WriteAccessControlAcl : public WriteAttribute { [cluster writeAttributeAclWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("AccessControl Acl write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("AccessControl Acl write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -8926,13 +8926,13 @@ class ReadAccessControlExtension : public ReadAttribute { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeExtensionWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.Extension response %@", [value description]); - if (error != nil) { - LogNSError("AccessControl Extension read Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.Extension response %@", [value description]); + if (error != nil) { + LogNSError("AccessControl Extension read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -8976,12 +8976,12 @@ class WriteAccessControlExtension : public WriteAttribute { [cluster writeAttributeExtensionWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("AccessControl Extension write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("AccessControl Extension write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -9046,8 +9046,7 @@ class ReadAccessControlSubjectsPerAccessControlEntry : public ReadAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSubjectsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.SubjectsPerAccessControlEntry response %@", [value description]); if (error != nil) { LogNSError("AccessControl SubjectsPerAccessControlEntry read Error", error); @@ -9113,8 +9112,7 @@ class ReadAccessControlTargetsPerAccessControlEntry : public ReadAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetsPerAccessControlEntryWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTargetsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.TargetsPerAccessControlEntry response %@", [value description]); if (error != nil) { LogNSError("AccessControl TargetsPerAccessControlEntry read Error", error); @@ -9180,8 +9178,7 @@ class ReadAccessControlAccessControlEntriesPerFabric : public ReadAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAccessControlEntriesPerFabricWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAccessControlEntriesPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AccessControlEntriesPerFabric response %@", [value description]); if (error != nil) { LogNSError("AccessControl AccessControlEntriesPerFabric read Error", error); @@ -9247,7 +9244,7 @@ class ReadAccessControlGeneratedCommandList : public ReadAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("AccessControl GeneratedCommandList read Error", error); @@ -9313,7 +9310,7 @@ class ReadAccessControlAcceptedCommandList : public ReadAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("AccessControl AcceptedCommandList read Error", error); @@ -9379,7 +9376,7 @@ class ReadAccessControlAttributeList : public ReadAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("AccessControl AttributeList read Error", error); @@ -9445,7 +9442,7 @@ class ReadAccessControlFeatureMap : public ReadAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("AccessControl FeatureMap read Error", error); @@ -9511,7 +9508,7 @@ class ReadAccessControlClusterRevision : public ReadAttribute { MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("AccessControl ClusterRevision read Error", error); @@ -9623,16 +9620,16 @@ class ActionsInstantAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster instantActionWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9677,16 +9674,16 @@ class ActionsInstantActionWithTransition : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster instantActionWithTransitionWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9729,16 +9726,16 @@ class ActionsStartAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster startActionWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9783,16 +9780,16 @@ class ActionsStartActionWithDuration : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster startActionWithDurationWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9835,16 +9832,16 @@ class ActionsStopAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopActionWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9887,16 +9884,16 @@ class ActionsPauseAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster pauseActionWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9941,16 +9938,16 @@ class ActionsPauseActionWithDuration : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster pauseActionWithDurationWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -9993,16 +9990,16 @@ class ActionsResumeAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster resumeActionWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -10045,16 +10042,16 @@ class ActionsEnableAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enableActionWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -10099,16 +10096,16 @@ class ActionsEnableActionWithDuration : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enableActionWithDurationWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -10151,16 +10148,16 @@ class ActionsDisableAction : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster disableActionWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -10205,16 +10202,16 @@ class ActionsDisableActionWithDuration : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster disableActionWithDurationWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -10243,7 +10240,7 @@ class ReadActionsActionList : public ReadAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActionListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActionListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ActionList response %@", [value description]); if (error != nil) { LogNSError("Actions ActionList read Error", error); @@ -10309,7 +10306,7 @@ class ReadActionsEndpointLists : public ReadAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEndpointListsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEndpointListsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.EndpointLists response %@", [value description]); if (error != nil) { LogNSError("Actions EndpointLists read Error", error); @@ -10375,7 +10372,7 @@ class ReadActionsSetupURL : public ReadAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetupURLWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSetupURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.SetupURL response %@", [value description]); if (error != nil) { LogNSError("Actions SetupURL read Error", error); @@ -10441,7 +10438,7 @@ class ReadActionsGeneratedCommandList : public ReadAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Actions GeneratedCommandList read Error", error); @@ -10507,7 +10504,7 @@ class ReadActionsAcceptedCommandList : public ReadAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Actions AcceptedCommandList read Error", error); @@ -10573,7 +10570,7 @@ class ReadActionsAttributeList : public ReadAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Actions AttributeList read Error", error); @@ -10639,7 +10636,7 @@ class ReadActionsFeatureMap : public ReadAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Actions FeatureMap read Error", error); @@ -10705,7 +10702,7 @@ class ReadActionsClusterRevision : public ReadAttribute { MTRBaseClusterActions * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Actions ClusterRevision read Error", error); @@ -10817,16 +10814,16 @@ class BasicMfgSpecificPing : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster mfgSpecificPingWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -10854,7 +10851,7 @@ class ReadBasicDataModelRevision : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.DataModelRevision response %@", [value description]); if (error != nil) { LogNSError("Basic DataModelRevision read Error", error); @@ -10920,7 +10917,7 @@ class ReadBasicVendorName : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.VendorName response %@", [value description]); if (error != nil) { LogNSError("Basic VendorName read Error", error); @@ -10986,7 +10983,7 @@ class ReadBasicVendorID : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.VendorID response %@", [value description]); if (error != nil) { LogNSError("Basic VendorID read Error", error); @@ -11052,7 +11049,7 @@ class ReadBasicProductName : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductName response %@", [value description]); if (error != nil) { LogNSError("Basic ProductName read Error", error); @@ -11118,7 +11115,7 @@ class ReadBasicProductID : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductID response %@", [value description]); if (error != nil) { LogNSError("Basic ProductID read Error", error); @@ -11184,7 +11181,7 @@ class ReadBasicNodeLabel : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.NodeLabel response %@", [value description]); if (error != nil) { LogNSError("Basic NodeLabel read Error", error); @@ -11224,12 +11221,12 @@ class WriteBasicNodeLabel : public WriteAttribute { [cluster writeAttributeNodeLabelWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Basic NodeLabel write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Basic NodeLabel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -11292,7 +11289,7 @@ class ReadBasicLocation : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.Location response %@", [value description]); if (error != nil) { LogNSError("Basic Location read Error", error); @@ -11332,12 +11329,12 @@ class WriteBasicLocation : public WriteAttribute { [cluster writeAttributeLocationWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Basic Location write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Basic Location write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -11400,7 +11397,7 @@ class ReadBasicHardwareVersion : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.HardwareVersion response %@", [value description]); if (error != nil) { LogNSError("Basic HardwareVersion read Error", error); @@ -11466,7 +11463,7 @@ class ReadBasicHardwareVersionString : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.HardwareVersionString response %@", [value description]); if (error != nil) { LogNSError("Basic HardwareVersionString read Error", error); @@ -11532,7 +11529,7 @@ class ReadBasicSoftwareVersion : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SoftwareVersion response %@", [value description]); if (error != nil) { LogNSError("Basic SoftwareVersion read Error", error); @@ -11598,7 +11595,7 @@ class ReadBasicSoftwareVersionString : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SoftwareVersionString response %@", [value description]); if (error != nil) { LogNSError("Basic SoftwareVersionString read Error", error); @@ -11664,7 +11661,7 @@ class ReadBasicManufacturingDate : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeManufacturingDateWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ManufacturingDate response %@", [value description]); if (error != nil) { LogNSError("Basic ManufacturingDate read Error", error); @@ -11730,7 +11727,7 @@ class ReadBasicPartNumber : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.PartNumber response %@", [value description]); if (error != nil) { LogNSError("Basic PartNumber read Error", error); @@ -11796,7 +11793,7 @@ class ReadBasicProductURL : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductURLWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductURL response %@", [value description]); if (error != nil) { LogNSError("Basic ProductURL read Error", error); @@ -11862,7 +11859,7 @@ class ReadBasicProductLabel : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ProductLabel response %@", [value description]); if (error != nil) { LogNSError("Basic ProductLabel read Error", error); @@ -11928,7 +11925,7 @@ class ReadBasicSerialNumber : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSerialNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.SerialNumber response %@", [value description]); if (error != nil) { LogNSError("Basic SerialNumber read Error", error); @@ -11994,7 +11991,7 @@ class ReadBasicLocalConfigDisabled : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.LocalConfigDisabled response %@", [value description]); if (error != nil) { LogNSError("Basic LocalConfigDisabled read Error", error); @@ -12032,12 +12029,12 @@ class WriteBasicLocalConfigDisabled : public WriteAttribute { [cluster writeAttributeLocalConfigDisabledWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Basic LocalConfigDisabled write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Basic LocalConfigDisabled write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -12100,7 +12097,7 @@ class ReadBasicReachable : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReachableWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.Reachable response %@", [value description]); if (error != nil) { LogNSError("Basic Reachable read Error", error); @@ -12166,7 +12163,7 @@ class ReadBasicUniqueID : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUniqueIDWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.UniqueID response %@", [value description]); if (error != nil) { LogNSError("Basic UniqueID read Error", error); @@ -12232,7 +12229,7 @@ class ReadBasicCapabilityMinima : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCapabilityMinimaWithCompletionHandler:^( + [cluster readAttributeCapabilityMinimaWithCompletion:^( MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.CapabilityMinima response %@", [value description]); if (error != nil) { @@ -12299,7 +12296,7 @@ class ReadBasicGeneratedCommandList : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Basic GeneratedCommandList read Error", error); @@ -12365,7 +12362,7 @@ class ReadBasicAcceptedCommandList : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Basic AcceptedCommandList read Error", error); @@ -12431,7 +12428,7 @@ class ReadBasicAttributeList : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Basic AttributeList read Error", error); @@ -12497,7 +12494,7 @@ class ReadBasicFeatureMap : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Basic FeatureMap read Error", error); @@ -12563,7 +12560,7 @@ class ReadBasicClusterRevision : public ReadAttribute { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Basic.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Basic ClusterRevision read Error", error); @@ -12696,18 +12693,18 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster queryImageWithParams:params - completionHandler:^(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -12747,18 +12744,18 @@ class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster applyUpdateRequestWithParams:params - completionHandler:^(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -12796,16 +12793,16 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster notifyUpdateAppliedWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -12833,7 +12830,7 @@ class ReadOtaSoftwareUpdateProviderGeneratedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateProvider * cluster = [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateProvider GeneratedCommandList read Error", error); @@ -12897,7 +12894,7 @@ class ReadOtaSoftwareUpdateProviderAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateProvider * cluster = [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateProvider AcceptedCommandList read Error", error); @@ -12961,7 +12958,7 @@ class ReadOtaSoftwareUpdateProviderAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateProvider * cluster = [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.AttributeList response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateProvider AttributeList read Error", error); @@ -13025,7 +13022,7 @@ class ReadOtaSoftwareUpdateProviderFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateProvider * cluster = [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateProvider FeatureMap read Error", error); @@ -13089,7 +13086,7 @@ class ReadOtaSoftwareUpdateProviderClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateProvider * cluster = [[MTRBaseClusterOtaSoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateProvider.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateProvider ClusterRevision read Error", error); @@ -13197,16 +13194,16 @@ class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster announceOtaProviderWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -13238,13 +13235,14 @@ class ReadOtaSoftwareUpdateRequestorDefaultOtaProviders : public ReadAttribute { params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeDefaultOtaProvidersWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OtaSoftwareUpdateRequestor.DefaultOtaProviders response %@", [value description]); - if (error != nil) { - LogNSError("OtaSoftwareUpdateRequestor DefaultOtaProviders read Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OtaSoftwareUpdateRequestor.DefaultOtaProviders response %@", + [value description]); + if (error != nil) { + LogNSError("OtaSoftwareUpdateRequestor DefaultOtaProviders read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -13286,14 +13284,15 @@ class WriteOtaSoftwareUpdateRequestorDefaultOtaProviders : public WriteAttribute value = array_0; } - [cluster writeAttributeDefaultOtaProvidersWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OtaSoftwareUpdateRequestor DefaultOtaProviders write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeDefaultOtaProvidersWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OtaSoftwareUpdateRequestor DefaultOtaProviders write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -13357,7 +13356,7 @@ class ReadOtaSoftwareUpdateRequestorUpdatePossible : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpdatePossibleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeUpdatePossibleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.UpdatePossible response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateRequestor UpdatePossible read Error", error); @@ -13421,7 +13420,7 @@ class ReadOtaSoftwareUpdateRequestorUpdateState : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpdateStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeUpdateStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.UpdateState response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateRequestor UpdateState read Error", error); @@ -13485,7 +13484,7 @@ class ReadOtaSoftwareUpdateRequestorUpdateStateProgress : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpdateStateProgressWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeUpdateStateProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateRequestor UpdateStateProgress read Error", error); @@ -13549,7 +13548,7 @@ class ReadOtaSoftwareUpdateRequestorGeneratedCommandList : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateRequestor GeneratedCommandList read Error", error); @@ -13613,7 +13612,7 @@ class ReadOtaSoftwareUpdateRequestorAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateRequestor AcceptedCommandList read Error", error); @@ -13677,7 +13676,7 @@ class ReadOtaSoftwareUpdateRequestorAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.AttributeList response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateRequestor AttributeList read Error", error); @@ -13741,7 +13740,7 @@ class ReadOtaSoftwareUpdateRequestorFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateRequestor FeatureMap read Error", error); @@ -13805,7 +13804,7 @@ class ReadOtaSoftwareUpdateRequestorClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOtaSoftwareUpdateRequestor * cluster = [[MTRBaseClusterOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OtaSoftwareUpdateRequestor.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("OtaSoftwareUpdateRequestor ClusterRevision read Error", error); @@ -13886,7 +13885,7 @@ class ReadLocalizationConfigurationActiveLocale : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveLocaleWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveLocaleWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration ActiveLocale read Error", error); @@ -13925,12 +13924,12 @@ class WriteLocalizationConfigurationActiveLocale : public WriteAttribute { [cluster writeAttributeActiveLocaleWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LocalizationConfiguration ActiveLocale write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LocalizationConfiguration ActiveLocale write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -13991,7 +13990,7 @@ class ReadLocalizationConfigurationSupportedLocales : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedLocalesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSupportedLocalesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration SupportedLocales read Error", error); @@ -14055,7 +14054,7 @@ class ReadLocalizationConfigurationGeneratedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration GeneratedCommandList read Error", error); @@ -14119,7 +14118,7 @@ class ReadLocalizationConfigurationAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration AcceptedCommandList read Error", error); @@ -14183,7 +14182,7 @@ class ReadLocalizationConfigurationAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration AttributeList read Error", error); @@ -14247,7 +14246,7 @@ class ReadLocalizationConfigurationFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration FeatureMap read Error", error); @@ -14311,7 +14310,7 @@ class ReadLocalizationConfigurationClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterLocalizationConfiguration * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("LocalizationConfiguration ClusterRevision read Error", error); @@ -14393,7 +14392,7 @@ class ReadTimeFormatLocalizationHourFormat : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHourFormatWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeHourFormatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization HourFormat read Error", error); @@ -14430,12 +14429,12 @@ class WriteTimeFormatLocalizationHourFormat : public WriteAttribute { [cluster writeAttributeHourFormatWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TimeFormatLocalization HourFormat write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TimeFormatLocalization HourFormat write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -14496,7 +14495,7 @@ class ReadTimeFormatLocalizationActiveCalendarType : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveCalendarTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveCalendarTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization ActiveCalendarType read Error", error); @@ -14533,12 +14532,12 @@ class WriteTimeFormatLocalizationActiveCalendarType : public WriteAttribute { [cluster writeAttributeActiveCalendarTypeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TimeFormatLocalization ActiveCalendarType write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TimeFormatLocalization ActiveCalendarType write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -14599,7 +14598,7 @@ class ReadTimeFormatLocalizationSupportedCalendarTypes : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedCalendarTypesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSupportedCalendarTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization SupportedCalendarTypes read Error", error); @@ -14663,7 +14662,7 @@ class ReadTimeFormatLocalizationGeneratedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization GeneratedCommandList read Error", error); @@ -14727,7 +14726,7 @@ class ReadTimeFormatLocalizationAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization AcceptedCommandList read Error", error); @@ -14791,7 +14790,7 @@ class ReadTimeFormatLocalizationAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization AttributeList read Error", error); @@ -14855,7 +14854,7 @@ class ReadTimeFormatLocalizationFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization FeatureMap read Error", error); @@ -14919,7 +14918,7 @@ class ReadTimeFormatLocalizationClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTimeFormatLocalization * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("TimeFormatLocalization ClusterRevision read Error", error); @@ -15000,7 +14999,7 @@ class ReadUnitLocalizationTemperatureUnit : public ReadAttribute { MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureUnitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization TemperatureUnit read Error", error); @@ -15038,12 +15037,12 @@ class WriteUnitLocalizationTemperatureUnit : public WriteAttribute { [cluster writeAttributeTemperatureUnitWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("UnitLocalization TemperatureUnit write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("UnitLocalization TemperatureUnit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -15106,7 +15105,7 @@ class ReadUnitLocalizationGeneratedCommandList : public ReadAttribute { MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization GeneratedCommandList read Error", error); @@ -15172,7 +15171,7 @@ class ReadUnitLocalizationAcceptedCommandList : public ReadAttribute { MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization AcceptedCommandList read Error", error); @@ -15238,7 +15237,7 @@ class ReadUnitLocalizationAttributeList : public ReadAttribute { MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AttributeList response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization AttributeList read Error", error); @@ -15304,7 +15303,7 @@ class ReadUnitLocalizationFeatureMap : public ReadAttribute { MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization FeatureMap read Error", error); @@ -15370,7 +15369,7 @@ class ReadUnitLocalizationClusterRevision : public ReadAttribute { MTRBaseClusterUnitLocalization * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("UnitLocalization ClusterRevision read Error", error); @@ -15451,7 +15450,7 @@ class ReadPowerSourceConfigurationSources : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSourcesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration Sources read Error", error); @@ -15515,7 +15514,7 @@ class ReadPowerSourceConfigurationGeneratedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration GeneratedCommandList read Error", error); @@ -15579,7 +15578,7 @@ class ReadPowerSourceConfigurationAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration AcceptedCommandList read Error", error); @@ -15643,7 +15642,7 @@ class ReadPowerSourceConfigurationAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration AttributeList read Error", error); @@ -15707,7 +15706,7 @@ class ReadPowerSourceConfigurationFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration FeatureMap read Error", error); @@ -15771,7 +15770,7 @@ class ReadPowerSourceConfigurationClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPowerSourceConfiguration * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("PowerSourceConfiguration ClusterRevision read Error", error); @@ -15882,7 +15881,7 @@ class ReadPowerSourceStatus : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Status response %@", [value description]); if (error != nil) { LogNSError("PowerSource Status read Error", error); @@ -15948,7 +15947,7 @@ class ReadPowerSourceOrder : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOrderWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Order response %@", [value description]); if (error != nil) { LogNSError("PowerSource Order read Error", error); @@ -16014,7 +16013,7 @@ class ReadPowerSourceDescription : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Description response %@", [value description]); if (error != nil) { LogNSError("PowerSource Description read Error", error); @@ -16080,14 +16079,13 @@ class ReadPowerSourceWiredAssessedInputVoltage : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeWiredAssessedInputVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); - if (error != nil) { - LogNSError("PowerSource WiredAssessedInputVoltage read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeWiredAssessedInputVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); + if (error != nil) { + LogNSError("PowerSource WiredAssessedInputVoltage read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -16147,14 +16145,13 @@ class ReadPowerSourceWiredAssessedInputFrequency : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeWiredAssessedInputFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); - if (error != nil) { - LogNSError("PowerSource WiredAssessedInputFrequency read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeWiredAssessedInputFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); + if (error != nil) { + LogNSError("PowerSource WiredAssessedInputFrequency read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -16214,7 +16211,7 @@ class ReadPowerSourceWiredCurrentType : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredCurrentTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); if (error != nil) { LogNSError("PowerSource WiredCurrentType read Error", error); @@ -16280,7 +16277,7 @@ class ReadPowerSourceWiredAssessedCurrent : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredAssessedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); if (error != nil) { LogNSError("PowerSource WiredAssessedCurrent read Error", error); @@ -16346,7 +16343,7 @@ class ReadPowerSourceWiredNominalVoltage : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredNominalVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); if (error != nil) { LogNSError("PowerSource WiredNominalVoltage read Error", error); @@ -16412,7 +16409,7 @@ class ReadPowerSourceWiredMaximumCurrent : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredMaximumCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); if (error != nil) { LogNSError("PowerSource WiredMaximumCurrent read Error", error); @@ -16478,7 +16475,7 @@ class ReadPowerSourceWiredPresent : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredPresentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredPresent response %@", [value description]); if (error != nil) { LogNSError("PowerSource WiredPresent read Error", error); @@ -16544,7 +16541,7 @@ class ReadPowerSourceActiveWiredFaults : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveWiredFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); if (error != nil) { LogNSError("PowerSource ActiveWiredFaults read Error", error); @@ -16610,7 +16607,7 @@ class ReadPowerSourceBatVoltage : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatVoltage response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatVoltage read Error", error); @@ -16676,7 +16673,7 @@ class ReadPowerSourceBatPercentRemaining : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatPercentRemainingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatPercentRemaining read Error", error); @@ -16742,7 +16739,7 @@ class ReadPowerSourceBatTimeRemaining : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatTimeRemainingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatTimeRemaining read Error", error); @@ -16808,7 +16805,7 @@ class ReadPowerSourceBatChargeLevel : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatChargeLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatChargeLevel read Error", error); @@ -16874,7 +16871,7 @@ class ReadPowerSourceBatReplacementNeeded : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatReplacementNeededWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatReplacementNeeded read Error", error); @@ -16940,7 +16937,7 @@ class ReadPowerSourceBatReplaceability : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatReplaceabilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplaceability response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatReplaceability read Error", error); @@ -17006,7 +17003,7 @@ class ReadPowerSourceBatPresent : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatPresentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPresent response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatPresent read Error", error); @@ -17072,7 +17069,7 @@ class ReadPowerSourceActiveBatFaults : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveBatFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); if (error != nil) { LogNSError("PowerSource ActiveBatFaults read Error", error); @@ -17138,14 +17135,13 @@ class ReadPowerSourceBatReplacementDescription : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeBatReplacementDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); - if (error != nil) { - LogNSError("PowerSource BatReplacementDescription read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeBatReplacementDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); + if (error != nil) { + LogNSError("PowerSource BatReplacementDescription read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -17205,7 +17201,7 @@ class ReadPowerSourceBatCommonDesignation : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatCommonDesignationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatCommonDesignation read Error", error); @@ -17271,7 +17267,7 @@ class ReadPowerSourceBatANSIDesignation : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatANSIDesignationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatANSIDesignation read Error", error); @@ -17337,7 +17333,7 @@ class ReadPowerSourceBatIECDesignation : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatIECDesignationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatIECDesignation read Error", error); @@ -17403,7 +17399,7 @@ class ReadPowerSourceBatApprovedChemistry : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatApprovedChemistryWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatApprovedChemistry read Error", error); @@ -17469,7 +17465,7 @@ class ReadPowerSourceBatCapacity : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCapacity response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatCapacity read Error", error); @@ -17535,7 +17531,7 @@ class ReadPowerSourceBatQuantity : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatQuantityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatQuantity response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatQuantity read Error", error); @@ -17601,7 +17597,7 @@ class ReadPowerSourceBatChargeState : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatChargeStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeState response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatChargeState read Error", error); @@ -17667,7 +17663,7 @@ class ReadPowerSourceBatTimeToFullCharge : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatTimeToFullChargeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatTimeToFullCharge read Error", error); @@ -17733,14 +17729,13 @@ class ReadPowerSourceBatFunctionalWhileCharging : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeBatFunctionalWhileChargingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); - if (error != nil) { - LogNSError("PowerSource BatFunctionalWhileCharging read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeBatFunctionalWhileChargingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); + if (error != nil) { + LogNSError("PowerSource BatFunctionalWhileCharging read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -17800,7 +17795,7 @@ class ReadPowerSourceBatChargingCurrent : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatChargingCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); if (error != nil) { LogNSError("PowerSource BatChargingCurrent read Error", error); @@ -17866,7 +17861,7 @@ class ReadPowerSourceActiveBatChargeFaults : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveBatChargeFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); if (error != nil) { LogNSError("PowerSource ActiveBatChargeFaults read Error", error); @@ -17932,7 +17927,7 @@ class ReadPowerSourceGeneratedCommandList : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("PowerSource GeneratedCommandList read Error", error); @@ -17998,7 +17993,7 @@ class ReadPowerSourceAcceptedCommandList : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("PowerSource AcceptedCommandList read Error", error); @@ -18064,7 +18059,7 @@ class ReadPowerSourceAttributeList : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AttributeList response %@", [value description]); if (error != nil) { LogNSError("PowerSource AttributeList read Error", error); @@ -18130,7 +18125,7 @@ class ReadPowerSourceFeatureMap : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("PowerSource FeatureMap read Error", error); @@ -18196,7 +18191,7 @@ class ReadPowerSourceClusterRevision : public ReadAttribute { MTRBaseClusterPowerSource * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("PowerSource ClusterRevision read Error", error); @@ -18295,18 +18290,18 @@ class GeneralCommissioningArmFailSafe : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster armFailSafeWithParams:params - completionHandler:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -18350,18 +18345,18 @@ class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { while (repeatCount--) { [cluster setRegulatoryConfigWithParams:params - completionHandler:^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -18396,19 +18391,19 @@ class GeneralCommissioningCommissioningComplete : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster commissioningCompleteWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -18436,7 +18431,7 @@ class ReadGeneralCommissioningBreadcrumb : public ReadAttribute { MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning Breadcrumb read Error", error); @@ -18474,12 +18469,12 @@ class WriteGeneralCommissioningBreadcrumb : public WriteAttribute { [cluster writeAttributeBreadcrumbWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("GeneralCommissioning Breadcrumb write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("GeneralCommissioning Breadcrumb write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -18542,7 +18537,7 @@ class ReadGeneralCommissioningBasicCommissioningInfo : public ReadAttribute { MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBasicCommissioningInfoWithCompletionHandler:^( + [cluster readAttributeBasicCommissioningInfoWithCompletion:^( MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); if (error != nil) { @@ -18609,7 +18604,7 @@ class ReadGeneralCommissioningRegulatoryConfig : public ReadAttribute { MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRegulatoryConfigWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning RegulatoryConfig read Error", error); @@ -18675,7 +18670,7 @@ class ReadGeneralCommissioningLocationCapability : public ReadAttribute { MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocationCapabilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning LocationCapability read Error", error); @@ -18741,8 +18736,7 @@ class ReadGeneralCommissioningSupportsConcurrentConnection : public ReadAttribut MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportsConcurrentConnectionWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning SupportsConcurrentConnection read Error", error); @@ -18808,7 +18802,7 @@ class ReadGeneralCommissioningGeneratedCommandList : public ReadAttribute { MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning GeneratedCommandList read Error", error); @@ -18874,7 +18868,7 @@ class ReadGeneralCommissioningAcceptedCommandList : public ReadAttribute { MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning AcceptedCommandList read Error", error); @@ -18940,7 +18934,7 @@ class ReadGeneralCommissioningAttributeList : public ReadAttribute { MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning AttributeList read Error", error); @@ -19006,7 +19000,7 @@ class ReadGeneralCommissioningFeatureMap : public ReadAttribute { MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning FeatureMap read Error", error); @@ -19072,7 +19066,7 @@ class ReadGeneralCommissioningClusterRevision : public ReadAttribute { MTRBaseClusterGeneralCommissioning * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("GeneralCommissioning ClusterRevision read Error", error); @@ -19190,18 +19184,18 @@ class NetworkCommissioningScanNetworks : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster scanNetworksWithParams:params - completionHandler:^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -19247,18 +19241,18 @@ class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { while (repeatCount--) { [cluster addOrUpdateWiFiNetworkWithParams:params - completionHandler:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -19303,18 +19297,18 @@ class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { while (repeatCount--) { [cluster addOrUpdateThreadNetworkWithParams:params - completionHandler:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -19357,18 +19351,18 @@ class NetworkCommissioningRemoveNetwork : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster removeNetworkWithParams:params - completionHandler:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -19411,18 +19405,18 @@ class NetworkCommissioningConnectNetwork : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster connectNetworkWithParams:params - completionHandler:^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -19467,18 +19461,18 @@ class NetworkCommissioningReorderNetwork : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster reorderNetworkWithParams:params - completionHandler:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -19507,7 +19501,7 @@ class ReadNetworkCommissioningMaxNetworks : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxNetworksWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxNetworksWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning MaxNetworks read Error", error); @@ -19573,7 +19567,7 @@ class ReadNetworkCommissioningNetworks : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNetworksWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNetworksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.Networks response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning Networks read Error", error); @@ -19639,7 +19633,7 @@ class ReadNetworkCommissioningScanMaxTimeSeconds : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScanMaxTimeSecondsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeScanMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning ScanMaxTimeSeconds read Error", error); @@ -19705,7 +19699,7 @@ class ReadNetworkCommissioningConnectMaxTimeSeconds : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeConnectMaxTimeSecondsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeConnectMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning ConnectMaxTimeSeconds read Error", error); @@ -19771,7 +19765,7 @@ class ReadNetworkCommissioningInterfaceEnabled : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInterfaceEnabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInterfaceEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning InterfaceEnabled read Error", error); @@ -19809,12 +19803,12 @@ class WriteNetworkCommissioningInterfaceEnabled : public WriteAttribute { [cluster writeAttributeInterfaceEnabledWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("NetworkCommissioning InterfaceEnabled write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("NetworkCommissioning InterfaceEnabled write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -19877,7 +19871,7 @@ class ReadNetworkCommissioningLastNetworkingStatus : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastNetworkingStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLastNetworkingStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning LastNetworkingStatus read Error", error); @@ -19943,7 +19937,7 @@ class ReadNetworkCommissioningLastNetworkID : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastNetworkIDWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLastNetworkIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning LastNetworkID read Error", error); @@ -20009,7 +20003,7 @@ class ReadNetworkCommissioningLastConnectErrorValue : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastConnectErrorValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLastConnectErrorValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning LastConnectErrorValue read Error", error); @@ -20075,7 +20069,7 @@ class ReadNetworkCommissioningGeneratedCommandList : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning GeneratedCommandList read Error", error); @@ -20141,7 +20135,7 @@ class ReadNetworkCommissioningAcceptedCommandList : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning AcceptedCommandList read Error", error); @@ -20207,7 +20201,7 @@ class ReadNetworkCommissioningAttributeList : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning AttributeList read Error", error); @@ -20273,7 +20267,7 @@ class ReadNetworkCommissioningFeatureMap : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning FeatureMap read Error", error); @@ -20339,7 +20333,7 @@ class ReadNetworkCommissioningClusterRevision : public ReadAttribute { MTRBaseClusterNetworkCommissioning * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("NetworkCommissioning ClusterRevision read Error", error); @@ -20434,18 +20428,18 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster retrieveLogsRequestWithParams:params - completionHandler:^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -20474,7 +20468,7 @@ class ReadDiagnosticLogsGeneratedCommandList : public ReadAttribute { MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("DiagnosticLogs GeneratedCommandList read Error", error); @@ -20540,7 +20534,7 @@ class ReadDiagnosticLogsAcceptedCommandList : public ReadAttribute { MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("DiagnosticLogs AcceptedCommandList read Error", error); @@ -20606,7 +20600,7 @@ class ReadDiagnosticLogsAttributeList : public ReadAttribute { MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); if (error != nil) { LogNSError("DiagnosticLogs AttributeList read Error", error); @@ -20672,7 +20666,7 @@ class ReadDiagnosticLogsFeatureMap : public ReadAttribute { MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("DiagnosticLogs FeatureMap read Error", error); @@ -20738,7 +20732,7 @@ class ReadDiagnosticLogsClusterRevision : public ReadAttribute { MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("DiagnosticLogs ClusterRevision read Error", error); @@ -20843,16 +20837,16 @@ class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testEventTriggerWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -20881,7 +20875,7 @@ class ReadGeneralDiagnosticsNetworkInterfaces : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNetworkInterfacesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics NetworkInterfaces read Error", error); @@ -20947,7 +20941,7 @@ class ReadGeneralDiagnosticsRebootCount : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRebootCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics RebootCount read Error", error); @@ -21013,7 +21007,7 @@ class ReadGeneralDiagnosticsUpTime : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics UpTime read Error", error); @@ -21079,7 +21073,7 @@ class ReadGeneralDiagnosticsTotalOperationalHours : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalOperationalHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics TotalOperationalHours read Error", error); @@ -21145,7 +21139,7 @@ class ReadGeneralDiagnosticsBootReasons : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBootReasonsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBootReasonsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.BootReasons response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics BootReasons read Error", error); @@ -21211,7 +21205,7 @@ class ReadGeneralDiagnosticsActiveHardwareFaults : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveHardwareFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveHardwareFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics ActiveHardwareFaults read Error", error); @@ -21277,7 +21271,7 @@ class ReadGeneralDiagnosticsActiveRadioFaults : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveRadioFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveRadioFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics ActiveRadioFaults read Error", error); @@ -21343,7 +21337,7 @@ class ReadGeneralDiagnosticsActiveNetworkFaults : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveNetworkFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveNetworkFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics ActiveNetworkFaults read Error", error); @@ -21409,14 +21403,13 @@ class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeTestEventTriggersEnabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); - if (error != nil) { - LogNSError("GeneralDiagnostics TestEventTriggersEnabled read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeTestEventTriggersEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); + if (error != nil) { + LogNSError("GeneralDiagnostics TestEventTriggersEnabled read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -21476,7 +21469,7 @@ class ReadGeneralDiagnosticsGeneratedCommandList : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics GeneratedCommandList read Error", error); @@ -21542,7 +21535,7 @@ class ReadGeneralDiagnosticsAcceptedCommandList : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics AcceptedCommandList read Error", error); @@ -21608,7 +21601,7 @@ class ReadGeneralDiagnosticsAttributeList : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics AttributeList read Error", error); @@ -21674,7 +21667,7 @@ class ReadGeneralDiagnosticsFeatureMap : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics FeatureMap read Error", error); @@ -21740,7 +21733,7 @@ class ReadGeneralDiagnosticsClusterRevision : public ReadAttribute { MTRBaseClusterGeneralDiagnostics * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("GeneralDiagnostics ClusterRevision read Error", error); @@ -21833,16 +21826,16 @@ class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster resetWatermarksWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -21870,7 +21863,7 @@ class ReadSoftwareDiagnosticsThreadMetrics : public ReadAttribute { MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThreadMetricsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeThreadMetricsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics ThreadMetrics read Error", error); @@ -21936,7 +21929,7 @@ class ReadSoftwareDiagnosticsCurrentHeapFree : public ReadAttribute { MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHeapFreeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentHeapFreeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics CurrentHeapFree read Error", error); @@ -22002,7 +21995,7 @@ class ReadSoftwareDiagnosticsCurrentHeapUsed : public ReadAttribute { MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHeapUsedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentHeapUsedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics CurrentHeapUsed read Error", error); @@ -22068,14 +22061,13 @@ class ReadSoftwareDiagnosticsCurrentHeapHighWatermark : public ReadAttribute { MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeCurrentHeapHighWatermarkWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); - if (error != nil) { - LogNSError("SoftwareDiagnostics CurrentHeapHighWatermark read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeCurrentHeapHighWatermarkWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); + if (error != nil) { + LogNSError("SoftwareDiagnostics CurrentHeapHighWatermark read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -22135,7 +22127,7 @@ class ReadSoftwareDiagnosticsGeneratedCommandList : public ReadAttribute { MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics GeneratedCommandList read Error", error); @@ -22201,7 +22193,7 @@ class ReadSoftwareDiagnosticsAcceptedCommandList : public ReadAttribute { MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics AcceptedCommandList read Error", error); @@ -22267,7 +22259,7 @@ class ReadSoftwareDiagnosticsAttributeList : public ReadAttribute { MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics AttributeList read Error", error); @@ -22333,7 +22325,7 @@ class ReadSoftwareDiagnosticsFeatureMap : public ReadAttribute { MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics FeatureMap read Error", error); @@ -22399,7 +22391,7 @@ class ReadSoftwareDiagnosticsClusterRevision : public ReadAttribute { MTRBaseClusterSoftwareDiagnostics * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("SoftwareDiagnostics ClusterRevision read Error", error); @@ -22551,16 +22543,16 @@ class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster resetCountsWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -22587,7 +22579,7 @@ class ReadThreadNetworkDiagnosticsChannel : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeChannelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics Channel read Error", error); @@ -22651,7 +22643,7 @@ class ReadThreadNetworkDiagnosticsRoutingRole : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRoutingRoleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRoutingRoleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RoutingRole read Error", error); @@ -22715,7 +22707,7 @@ class ReadThreadNetworkDiagnosticsNetworkName : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNetworkNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNetworkNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics NetworkName read Error", error); @@ -22779,7 +22771,7 @@ class ReadThreadNetworkDiagnosticsPanId : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePanIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics PanId read Error", error); @@ -22843,7 +22835,7 @@ class ReadThreadNetworkDiagnosticsExtendedPanId : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExtendedPanIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeExtendedPanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ExtendedPanId read Error", error); @@ -22907,7 +22899,7 @@ class ReadThreadNetworkDiagnosticsMeshLocalPrefix : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeshLocalPrefixWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMeshLocalPrefixWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics MeshLocalPrefix read Error", error); @@ -22971,7 +22963,7 @@ class ReadThreadNetworkDiagnosticsOverrunCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics OverrunCount read Error", error); @@ -23035,7 +23027,7 @@ class ReadThreadNetworkDiagnosticsNeighborTableList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNeighborTableListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNeighborTableListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NeighborTableList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics NeighborTableList read Error", error); @@ -23099,7 +23091,7 @@ class ReadThreadNetworkDiagnosticsRouteTableList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRouteTableListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRouteTableListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouteTableList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RouteTableList read Error", error); @@ -23163,7 +23155,7 @@ class ReadThreadNetworkDiagnosticsPartitionId : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartitionIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePartitionIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics PartitionId read Error", error); @@ -23227,7 +23219,7 @@ class ReadThreadNetworkDiagnosticsWeighting : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWeightingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWeightingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics Weighting read Error", error); @@ -23291,7 +23283,7 @@ class ReadThreadNetworkDiagnosticsDataVersion : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDataVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics DataVersion read Error", error); @@ -23355,7 +23347,7 @@ class ReadThreadNetworkDiagnosticsStableDataVersion : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStableDataVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStableDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics StableDataVersion read Error", error); @@ -23419,7 +23411,7 @@ class ReadThreadNetworkDiagnosticsLeaderRouterId : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLeaderRouterIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLeaderRouterIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics LeaderRouterId read Error", error); @@ -23483,7 +23475,7 @@ class ReadThreadNetworkDiagnosticsDetachedRoleCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDetachedRoleCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDetachedRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics DetachedRoleCount read Error", error); @@ -23547,7 +23539,7 @@ class ReadThreadNetworkDiagnosticsChildRoleCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChildRoleCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeChildRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ChildRoleCount read Error", error); @@ -23611,7 +23603,7 @@ class ReadThreadNetworkDiagnosticsRouterRoleCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRouterRoleCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRouterRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RouterRoleCount read Error", error); @@ -23675,7 +23667,7 @@ class ReadThreadNetworkDiagnosticsLeaderRoleCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLeaderRoleCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLeaderRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics LeaderRoleCount read Error", error); @@ -23739,7 +23731,7 @@ class ReadThreadNetworkDiagnosticsAttachAttemptCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttachAttemptCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics AttachAttemptCount read Error", error); @@ -23803,7 +23795,7 @@ class ReadThreadNetworkDiagnosticsPartitionIdChangeCount : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartitionIdChangeCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePartitionIdChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics PartitionIdChangeCount read Error", error); @@ -23867,14 +23859,14 @@ class ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public Rea dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); - if (error != nil) { - LogNSError("ThreadNetworkDiagnostics BetterPartitionAttachAttemptCount read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeBetterPartitionAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); + if (error != nil) { + LogNSError("ThreadNetworkDiagnostics BetterPartitionAttachAttemptCount read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -23932,7 +23924,7 @@ class ReadThreadNetworkDiagnosticsParentChangeCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeParentChangeCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeParentChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ParentChangeCount read Error", error); @@ -23996,7 +23988,7 @@ class ReadThreadNetworkDiagnosticsTxTotalCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxTotalCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxTotalCount read Error", error); @@ -24060,7 +24052,7 @@ class ReadThreadNetworkDiagnosticsTxUnicastCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxUnicastCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxUnicastCount read Error", error); @@ -24124,7 +24116,7 @@ class ReadThreadNetworkDiagnosticsTxBroadcastCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxBroadcastCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxBroadcastCount read Error", error); @@ -24188,7 +24180,7 @@ class ReadThreadNetworkDiagnosticsTxAckRequestedCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxAckRequestedCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxAckRequestedCount read Error", error); @@ -24252,7 +24244,7 @@ class ReadThreadNetworkDiagnosticsTxAckedCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxAckedCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxAckedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxAckedCount read Error", error); @@ -24316,7 +24308,7 @@ class ReadThreadNetworkDiagnosticsTxNoAckRequestedCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxNoAckRequestedCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxNoAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxNoAckRequestedCount read Error", error); @@ -24380,7 +24372,7 @@ class ReadThreadNetworkDiagnosticsTxDataCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxDataCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxDataCount read Error", error); @@ -24444,7 +24436,7 @@ class ReadThreadNetworkDiagnosticsTxDataPollCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxDataPollCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxDataPollCount read Error", error); @@ -24508,7 +24500,7 @@ class ReadThreadNetworkDiagnosticsTxBeaconCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxBeaconCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxBeaconCount read Error", error); @@ -24572,7 +24564,7 @@ class ReadThreadNetworkDiagnosticsTxBeaconRequestCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxBeaconRequestCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxBeaconRequestCount read Error", error); @@ -24636,7 +24628,7 @@ class ReadThreadNetworkDiagnosticsTxOtherCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxOtherCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxOtherCount read Error", error); @@ -24700,7 +24692,7 @@ class ReadThreadNetworkDiagnosticsTxRetryCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxRetryCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxRetryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxRetryCount read Error", error); @@ -24764,14 +24756,13 @@ class ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public ReadAttri dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); - if (error != nil) { - LogNSError("ThreadNetworkDiagnostics TxDirectMaxRetryExpiryCount read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeTxDirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); + if (error != nil) { + LogNSError("ThreadNetworkDiagnostics TxDirectMaxRetryExpiryCount read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -24829,8 +24820,7 @@ class ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public ReadAtt dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxIndirectMaxRetryExpiryCount read Error", error); @@ -24894,7 +24884,7 @@ class ReadThreadNetworkDiagnosticsTxErrCcaCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrCcaCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxErrCcaCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxErrCcaCount read Error", error); @@ -24958,7 +24948,7 @@ class ReadThreadNetworkDiagnosticsTxErrAbortCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrAbortCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxErrAbortCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxErrAbortCount read Error", error); @@ -25022,7 +25012,7 @@ class ReadThreadNetworkDiagnosticsTxErrBusyChannelCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrBusyChannelCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxErrBusyChannelCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics TxErrBusyChannelCount read Error", error); @@ -25086,7 +25076,7 @@ class ReadThreadNetworkDiagnosticsRxTotalCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxTotalCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxTotalCount read Error", error); @@ -25150,7 +25140,7 @@ class ReadThreadNetworkDiagnosticsRxUnicastCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxUnicastCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxUnicastCount read Error", error); @@ -25214,7 +25204,7 @@ class ReadThreadNetworkDiagnosticsRxBroadcastCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxBroadcastCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxBroadcastCount read Error", error); @@ -25278,7 +25268,7 @@ class ReadThreadNetworkDiagnosticsRxDataCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxDataCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxDataCount read Error", error); @@ -25342,7 +25332,7 @@ class ReadThreadNetworkDiagnosticsRxDataPollCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxDataPollCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxDataPollCount read Error", error); @@ -25406,7 +25396,7 @@ class ReadThreadNetworkDiagnosticsRxBeaconCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxBeaconCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxBeaconCount read Error", error); @@ -25470,7 +25460,7 @@ class ReadThreadNetworkDiagnosticsRxBeaconRequestCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxBeaconRequestCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxBeaconRequestCount read Error", error); @@ -25534,7 +25524,7 @@ class ReadThreadNetworkDiagnosticsRxOtherCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxOtherCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxOtherCount read Error", error); @@ -25598,7 +25588,7 @@ class ReadThreadNetworkDiagnosticsRxAddressFilteredCount : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxAddressFilteredCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxAddressFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxAddressFilteredCount read Error", error); @@ -25662,14 +25652,13 @@ class ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeRxDestAddrFilteredCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); - if (error != nil) { - LogNSError("ThreadNetworkDiagnostics RxDestAddrFilteredCount read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeRxDestAddrFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); + if (error != nil) { + LogNSError("ThreadNetworkDiagnostics RxDestAddrFilteredCount read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -25727,7 +25716,7 @@ class ReadThreadNetworkDiagnosticsRxDuplicatedCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxDuplicatedCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxDuplicatedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxDuplicatedCount read Error", error); @@ -25791,7 +25780,7 @@ class ReadThreadNetworkDiagnosticsRxErrNoFrameCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrNoFrameCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxErrNoFrameCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxErrNoFrameCount read Error", error); @@ -25855,14 +25844,13 @@ class ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public ReadAttribu dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeRxErrUnknownNeighborCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); - if (error != nil) { - LogNSError("ThreadNetworkDiagnostics RxErrUnknownNeighborCount read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeRxErrUnknownNeighborCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); + if (error != nil) { + LogNSError("ThreadNetworkDiagnostics RxErrUnknownNeighborCount read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -25920,14 +25908,13 @@ class ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public ReadAttribut dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); - if (error != nil) { - LogNSError("ThreadNetworkDiagnostics RxErrInvalidSrcAddrCount read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeRxErrInvalidSrcAddrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); + if (error != nil) { + LogNSError("ThreadNetworkDiagnostics RxErrInvalidSrcAddrCount read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -25985,7 +25972,7 @@ class ReadThreadNetworkDiagnosticsRxErrSecCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrSecCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxErrSecCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxErrSecCount read Error", error); @@ -26049,7 +26036,7 @@ class ReadThreadNetworkDiagnosticsRxErrFcsCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrFcsCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxErrFcsCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxErrFcsCount read Error", error); @@ -26113,7 +26100,7 @@ class ReadThreadNetworkDiagnosticsRxErrOtherCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrOtherCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRxErrOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics RxErrOtherCount read Error", error); @@ -26177,7 +26164,7 @@ class ReadThreadNetworkDiagnosticsActiveTimestamp : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveTimestampWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ActiveTimestamp read Error", error); @@ -26241,7 +26228,7 @@ class ReadThreadNetworkDiagnosticsPendingTimestamp : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePendingTimestampWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePendingTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics PendingTimestamp read Error", error); @@ -26305,7 +26292,7 @@ class ReadThreadNetworkDiagnosticsDelay : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics Delay read Error", error); @@ -26369,7 +26356,7 @@ class ReadThreadNetworkDiagnosticsSecurityPolicy : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSecurityPolicyWithCompletionHandler:^( + [cluster readAttributeSecurityPolicyWithCompletion:^( MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); if (error != nil) { @@ -26434,7 +26421,7 @@ class ReadThreadNetworkDiagnosticsChannelPage0Mask : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelPage0MaskWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeChannelPage0MaskWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ChannelPage0Mask read Error", error); @@ -26498,7 +26485,7 @@ class ReadThreadNetworkDiagnosticsOperationalDatasetComponents : public ReadAttr dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalDatasetComponentsWithCompletionHandler:^( + [cluster readAttributeOperationalDatasetComponentsWithCompletion:^( MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); if (error != nil) { @@ -26564,7 +26551,7 @@ class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveNetworkFaultsListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveNetworkFaultsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ActiveNetworkFaultsList read Error", error); @@ -26628,7 +26615,7 @@ class ReadThreadNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics GeneratedCommandList read Error", error); @@ -26692,7 +26679,7 @@ class ReadThreadNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics AcceptedCommandList read Error", error); @@ -26756,7 +26743,7 @@ class ReadThreadNetworkDiagnosticsAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics AttributeList read Error", error); @@ -26820,7 +26807,7 @@ class ReadThreadNetworkDiagnosticsFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics FeatureMap read Error", error); @@ -26884,7 +26871,7 @@ class ReadThreadNetworkDiagnosticsClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterThreadNetworkDiagnostics * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ThreadNetworkDiagnostics ClusterRevision read Error", error); @@ -26986,16 +26973,16 @@ class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster resetCountsWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -27022,7 +27009,7 @@ class ReadWiFiNetworkDiagnosticsBssid : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBssidWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBssidWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.Bssid response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics Bssid read Error", error); @@ -27086,7 +27073,7 @@ class ReadWiFiNetworkDiagnosticsSecurityType : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSecurityTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics SecurityType read Error", error); @@ -27150,7 +27137,7 @@ class ReadWiFiNetworkDiagnosticsWiFiVersion : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiFiVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics WiFiVersion read Error", error); @@ -27214,7 +27201,7 @@ class ReadWiFiNetworkDiagnosticsChannelNumber : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelNumberWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics ChannelNumber read Error", error); @@ -27278,7 +27265,7 @@ class ReadWiFiNetworkDiagnosticsRssi : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRssiWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRssiWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.Rssi response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics Rssi read Error", error); @@ -27342,7 +27329,7 @@ class ReadWiFiNetworkDiagnosticsBeaconLostCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBeaconLostCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics BeaconLostCount read Error", error); @@ -27406,7 +27393,7 @@ class ReadWiFiNetworkDiagnosticsBeaconRxCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBeaconRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics BeaconRxCount read Error", error); @@ -27470,7 +27457,7 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastRxCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketMulticastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics PacketMulticastRxCount read Error", error); @@ -27534,7 +27521,7 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastTxCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketMulticastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics PacketMulticastTxCount read Error", error); @@ -27598,7 +27585,7 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastRxCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketUnicastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics PacketUnicastRxCount read Error", error); @@ -27662,7 +27649,7 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastTxCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketUnicastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics PacketUnicastTxCount read Error", error); @@ -27726,7 +27713,7 @@ class ReadWiFiNetworkDiagnosticsCurrentMaxRate : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentMaxRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics CurrentMaxRate read Error", error); @@ -27790,7 +27777,7 @@ class ReadWiFiNetworkDiagnosticsOverrunCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics OverrunCount read Error", error); @@ -27854,7 +27841,7 @@ class ReadWiFiNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics GeneratedCommandList read Error", error); @@ -27918,7 +27905,7 @@ class ReadWiFiNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics AcceptedCommandList read Error", error); @@ -27982,7 +27969,7 @@ class ReadWiFiNetworkDiagnosticsAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics AttributeList read Error", error); @@ -28046,7 +28033,7 @@ class ReadWiFiNetworkDiagnosticsFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics FeatureMap read Error", error); @@ -28110,7 +28097,7 @@ class ReadWiFiNetworkDiagnosticsClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterWiFiNetworkDiagnostics * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("WiFiNetworkDiagnostics ClusterRevision read Error", error); @@ -28205,16 +28192,16 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster resetCountsWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -28241,7 +28228,7 @@ class ReadEthernetNetworkDiagnosticsPHYRate : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics PHYRate read Error", error); @@ -28305,7 +28292,7 @@ class ReadEthernetNetworkDiagnosticsFullDuplex : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFullDuplexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics FullDuplex read Error", error); @@ -28369,7 +28356,7 @@ class ReadEthernetNetworkDiagnosticsPacketRxCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics PacketRxCount read Error", error); @@ -28433,7 +28420,7 @@ class ReadEthernetNetworkDiagnosticsPacketTxCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics PacketTxCount read Error", error); @@ -28497,7 +28484,7 @@ class ReadEthernetNetworkDiagnosticsTxErrCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics TxErrCount read Error", error); @@ -28561,7 +28548,7 @@ class ReadEthernetNetworkDiagnosticsCollisionCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics CollisionCount read Error", error); @@ -28625,7 +28612,7 @@ class ReadEthernetNetworkDiagnosticsOverrunCount : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics OverrunCount read Error", error); @@ -28689,7 +28676,7 @@ class ReadEthernetNetworkDiagnosticsCarrierDetect : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCarrierDetectWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics CarrierDetect read Error", error); @@ -28753,7 +28740,7 @@ class ReadEthernetNetworkDiagnosticsTimeSinceReset : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeSinceResetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics TimeSinceReset read Error", error); @@ -28817,7 +28804,7 @@ class ReadEthernetNetworkDiagnosticsGeneratedCommandList : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics GeneratedCommandList read Error", error); @@ -28881,7 +28868,7 @@ class ReadEthernetNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics AcceptedCommandList read Error", error); @@ -28945,7 +28932,7 @@ class ReadEthernetNetworkDiagnosticsAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics AttributeList read Error", error); @@ -29009,7 +28996,7 @@ class ReadEthernetNetworkDiagnosticsFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics FeatureMap read Error", error); @@ -29073,7 +29060,7 @@ class ReadEthernetNetworkDiagnosticsClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterEthernetNetworkDiagnostics * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("EthernetNetworkDiagnostics ClusterRevision read Error", error); @@ -29172,7 +29159,7 @@ class ReadBridgedDeviceBasicVendorName : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.VendorName response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic VendorName read Error", error); @@ -29238,7 +29225,7 @@ class ReadBridgedDeviceBasicVendorID : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.VendorID response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic VendorID read Error", error); @@ -29304,7 +29291,7 @@ class ReadBridgedDeviceBasicProductName : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductName response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic ProductName read Error", error); @@ -29370,7 +29357,7 @@ class ReadBridgedDeviceBasicNodeLabel : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.NodeLabel response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic NodeLabel read Error", error); @@ -29410,12 +29397,12 @@ class WriteBridgedDeviceBasicNodeLabel : public WriteAttribute { [cluster writeAttributeNodeLabelWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BridgedDeviceBasic NodeLabel write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BridgedDeviceBasic NodeLabel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -29478,7 +29465,7 @@ class ReadBridgedDeviceBasicHardwareVersion : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.HardwareVersion response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic HardwareVersion read Error", error); @@ -29544,7 +29531,7 @@ class ReadBridgedDeviceBasicHardwareVersionString : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.HardwareVersionString response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic HardwareVersionString read Error", error); @@ -29610,7 +29597,7 @@ class ReadBridgedDeviceBasicSoftwareVersion : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SoftwareVersion response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic SoftwareVersion read Error", error); @@ -29676,7 +29663,7 @@ class ReadBridgedDeviceBasicSoftwareVersionString : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SoftwareVersionString response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic SoftwareVersionString read Error", error); @@ -29742,7 +29729,7 @@ class ReadBridgedDeviceBasicManufacturingDate : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeManufacturingDateWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ManufacturingDate response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic ManufacturingDate read Error", error); @@ -29808,7 +29795,7 @@ class ReadBridgedDeviceBasicPartNumber : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.PartNumber response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic PartNumber read Error", error); @@ -29874,7 +29861,7 @@ class ReadBridgedDeviceBasicProductURL : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductURLWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductURL response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic ProductURL read Error", error); @@ -29940,7 +29927,7 @@ class ReadBridgedDeviceBasicProductLabel : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ProductLabel response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic ProductLabel read Error", error); @@ -30006,7 +29993,7 @@ class ReadBridgedDeviceBasicSerialNumber : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSerialNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.SerialNumber response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic SerialNumber read Error", error); @@ -30072,7 +30059,7 @@ class ReadBridgedDeviceBasicReachable : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReachableWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.Reachable response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic Reachable read Error", error); @@ -30138,7 +30125,7 @@ class ReadBridgedDeviceBasicUniqueID : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUniqueIDWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.UniqueID response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic UniqueID read Error", error); @@ -30204,7 +30191,7 @@ class ReadBridgedDeviceBasicGeneratedCommandList : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic GeneratedCommandList read Error", error); @@ -30270,7 +30257,7 @@ class ReadBridgedDeviceBasicAcceptedCommandList : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic AcceptedCommandList read Error", error); @@ -30336,7 +30323,7 @@ class ReadBridgedDeviceBasicAttributeList : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.AttributeList response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic AttributeList read Error", error); @@ -30402,7 +30389,7 @@ class ReadBridgedDeviceBasicFeatureMap : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic FeatureMap read Error", error); @@ -30468,7 +30455,7 @@ class ReadBridgedDeviceBasicClusterRevision : public ReadAttribute { MTRBaseClusterBridgedDeviceBasic * cluster = [[MTRBaseClusterBridgedDeviceBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasic.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("BridgedDeviceBasic ClusterRevision read Error", error); @@ -30559,7 +30546,7 @@ class ReadSwitchNumberOfPositions : public ReadAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPositionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.NumberOfPositions response %@", [value description]); if (error != nil) { LogNSError("Switch NumberOfPositions read Error", error); @@ -30625,7 +30612,7 @@ class ReadSwitchCurrentPosition : public ReadAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.CurrentPosition response %@", [value description]); if (error != nil) { LogNSError("Switch CurrentPosition read Error", error); @@ -30691,7 +30678,7 @@ class ReadSwitchMultiPressMax : public ReadAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMultiPressMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.MultiPressMax response %@", [value description]); if (error != nil) { LogNSError("Switch MultiPressMax read Error", error); @@ -30757,7 +30744,7 @@ class ReadSwitchGeneratedCommandList : public ReadAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Switch GeneratedCommandList read Error", error); @@ -30823,7 +30810,7 @@ class ReadSwitchAcceptedCommandList : public ReadAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Switch AcceptedCommandList read Error", error); @@ -30889,7 +30876,7 @@ class ReadSwitchAttributeList : public ReadAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Switch AttributeList read Error", error); @@ -30955,7 +30942,7 @@ class ReadSwitchFeatureMap : public ReadAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Switch FeatureMap read Error", error); @@ -31021,7 +31008,7 @@ class ReadSwitchClusterRevision : public ReadAttribute { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Switch ClusterRevision read Error", error); @@ -31123,16 +31110,16 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster openCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -31168,16 +31155,16 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCom uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -31211,16 +31198,16 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster revokeCommissioningWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -31247,7 +31234,7 @@ class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning WindowStatus read Error", error); @@ -31311,7 +31298,7 @@ class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning AdminFabricIndex read Error", error); @@ -31375,7 +31362,7 @@ class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning AdminVendorId read Error", error); @@ -31439,7 +31426,7 @@ class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); @@ -31503,7 +31490,7 @@ class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); @@ -31567,7 +31554,7 @@ class ReadAdministratorCommissioningAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning AttributeList read Error", error); @@ -31631,7 +31618,7 @@ class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning FeatureMap read Error", error); @@ -31695,7 +31682,7 @@ class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterAdministratorCommissioning * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("AdministratorCommissioning ClusterRevision read Error", error); @@ -31796,18 +31783,18 @@ class OperationalCredentialsAttestationRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster attestationRequestWithParams:params - completionHandler:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -31843,19 +31830,19 @@ class OperationalCredentialsCertificateChainRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster certificateChainRequestWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -31897,18 +31884,18 @@ class OperationalCredentialsCSRRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster CSRRequestWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -31956,18 +31943,18 @@ class OperationalCredentialsAddNOC : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster addNOCWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -32009,18 +31996,18 @@ class OperationalCredentialsUpdateNOC : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster updateNOCWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -32058,18 +32045,18 @@ class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster updateFabricLabelWithParams:params - completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -32105,18 +32092,18 @@ class OperationalCredentialsRemoveFabric : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster removeFabricWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -32152,16 +32139,16 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster addTrustedRootCertificateWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -32192,13 +32179,13 @@ class ReadOperationalCredentialsNOCs : public ReadAttribute { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeNOCsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.NOCs response %@", [value description]); - if (error != nil) { - LogNSError("OperationalCredentials NOCs read Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + if (error != nil) { + LogNSError("OperationalCredentials NOCs read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -32259,13 +32246,13 @@ class ReadOperationalCredentialsFabrics : public ReadAttribute { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); - if (error != nil) { - LogNSError("OperationalCredentials Fabrics read Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); + if (error != nil) { + LogNSError("OperationalCredentials Fabrics read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -32323,7 +32310,7 @@ class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials SupportedFabrics read Error", error); @@ -32387,7 +32374,7 @@ class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCommissionedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials CommissionedFabrics read Error", error); @@ -32451,7 +32438,7 @@ class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTrustedRootCertificatesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials TrustedRootCertificates read Error", error); @@ -32515,7 +32502,7 @@ class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials CurrentFabricIndex read Error", error); @@ -32579,7 +32566,7 @@ class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials GeneratedCommandList read Error", error); @@ -32643,7 +32630,7 @@ class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials AcceptedCommandList read Error", error); @@ -32707,7 +32694,7 @@ class ReadOperationalCredentialsAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials AttributeList read Error", error); @@ -32771,7 +32758,7 @@ class ReadOperationalCredentialsFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials FeatureMap read Error", error); @@ -32835,7 +32822,7 @@ class ReadOperationalCredentialsClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterOperationalCredentials * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("OperationalCredentials ClusterRevision read Error", error); @@ -32968,16 +32955,16 @@ class GroupKeyManagementKeySetWrite : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster keySetWriteWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -33015,18 +33002,18 @@ class GroupKeyManagementKeySetRead : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster keySetReadWithParams:params - completionHandler:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -33063,16 +33050,16 @@ class GroupKeyManagementKeySetRemove : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster keySetRemoveWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -33119,18 +33106,18 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { while (repeatCount--) { [cluster keySetReadAllIndicesWithParams:params - completionHandler:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -33163,13 +33150,13 @@ class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeGroupKeyMapWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement GroupKeyMap read Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + if (error != nil) { + LogNSError("GroupKeyManagement GroupKeyMap read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -33214,12 +33201,12 @@ class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { [cluster writeAttributeGroupKeyMapWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("GroupKeyManagement GroupKeyMap write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("GroupKeyManagement GroupKeyMap write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -33288,13 +33275,13 @@ class ReadGroupKeyManagementGroupTable : public ReadAttribute { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeGroupTableWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement GroupTable read Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); + if (error != nil) { + LogNSError("GroupKeyManagement GroupTable read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -33354,7 +33341,7 @@ class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxGroupsPerFabricWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement MaxGroupsPerFabric read Error", error); @@ -33420,7 +33407,7 @@ class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxGroupKeysPerFabricWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); @@ -33486,7 +33473,7 @@ class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement GeneratedCommandList read Error", error); @@ -33552,7 +33539,7 @@ class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement AcceptedCommandList read Error", error); @@ -33618,7 +33605,7 @@ class ReadGroupKeyManagementAttributeList : public ReadAttribute { MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement AttributeList read Error", error); @@ -33684,7 +33671,7 @@ class ReadGroupKeyManagementFeatureMap : public ReadAttribute { MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement FeatureMap read Error", error); @@ -33750,7 +33737,7 @@ class ReadGroupKeyManagementClusterRevision : public ReadAttribute { MTRBaseClusterGroupKeyManagement * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("GroupKeyManagement ClusterRevision read Error", error); @@ -33832,7 +33819,7 @@ class ReadFixedLabelLabelList : public ReadAttribute { MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.LabelList response %@", [value description]); if (error != nil) { LogNSError("FixedLabel LabelList read Error", error); @@ -33898,7 +33885,7 @@ class ReadFixedLabelGeneratedCommandList : public ReadAttribute { MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("FixedLabel GeneratedCommandList read Error", error); @@ -33964,7 +33951,7 @@ class ReadFixedLabelAcceptedCommandList : public ReadAttribute { MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("FixedLabel AcceptedCommandList read Error", error); @@ -34030,7 +34017,7 @@ class ReadFixedLabelAttributeList : public ReadAttribute { MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AttributeList response %@", [value description]); if (error != nil) { LogNSError("FixedLabel AttributeList read Error", error); @@ -34096,7 +34083,7 @@ class ReadFixedLabelFeatureMap : public ReadAttribute { MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("FixedLabel FeatureMap read Error", error); @@ -34162,7 +34149,7 @@ class ReadFixedLabelClusterRevision : public ReadAttribute { MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("FixedLabel ClusterRevision read Error", error); @@ -34244,7 +34231,7 @@ class ReadUserLabelLabelList : public ReadAttribute { MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.LabelList response %@", [value description]); if (error != nil) { LogNSError("UserLabel LabelList read Error", error); @@ -34298,12 +34285,12 @@ class WriteUserLabelLabelList : public WriteAttribute { [cluster writeAttributeLabelListWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("UserLabel LabelList write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("UserLabel LabelList write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -34367,7 +34354,7 @@ class ReadUserLabelGeneratedCommandList : public ReadAttribute { MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("UserLabel GeneratedCommandList read Error", error); @@ -34433,7 +34420,7 @@ class ReadUserLabelAcceptedCommandList : public ReadAttribute { MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("UserLabel AcceptedCommandList read Error", error); @@ -34499,7 +34486,7 @@ class ReadUserLabelAttributeList : public ReadAttribute { MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AttributeList response %@", [value description]); if (error != nil) { LogNSError("UserLabel AttributeList read Error", error); @@ -34565,7 +34552,7 @@ class ReadUserLabelFeatureMap : public ReadAttribute { MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("UserLabel FeatureMap read Error", error); @@ -34631,7 +34618,7 @@ class ReadUserLabelClusterRevision : public ReadAttribute { MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("UserLabel ClusterRevision read Error", error); @@ -34714,7 +34701,7 @@ class ReadBooleanStateStateValue : public ReadAttribute { MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.StateValue response %@", [value description]); if (error != nil) { LogNSError("BooleanState StateValue read Error", error); @@ -34780,7 +34767,7 @@ class ReadBooleanStateGeneratedCommandList : public ReadAttribute { MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("BooleanState GeneratedCommandList read Error", error); @@ -34846,7 +34833,7 @@ class ReadBooleanStateAcceptedCommandList : public ReadAttribute { MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("BooleanState AcceptedCommandList read Error", error); @@ -34912,7 +34899,7 @@ class ReadBooleanStateAttributeList : public ReadAttribute { MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AttributeList response %@", [value description]); if (error != nil) { LogNSError("BooleanState AttributeList read Error", error); @@ -34978,7 +34965,7 @@ class ReadBooleanStateFeatureMap : public ReadAttribute { MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("BooleanState FeatureMap read Error", error); @@ -35044,7 +35031,7 @@ class ReadBooleanStateClusterRevision : public ReadAttribute { MTRBaseClusterBooleanState * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("BooleanState ClusterRevision read Error", error); @@ -35140,16 +35127,16 @@ class ModeSelectChangeToMode : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -35178,7 +35165,7 @@ class ReadModeSelectDescription : public ReadAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.Description response %@", [value description]); if (error != nil) { LogNSError("ModeSelect Description read Error", error); @@ -35244,7 +35231,7 @@ class ReadModeSelectStandardNamespace : public ReadAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStandardNamespaceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); if (error != nil) { LogNSError("ModeSelect StandardNamespace read Error", error); @@ -35310,7 +35297,7 @@ class ReadModeSelectSupportedModes : public ReadAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.SupportedModes response %@", [value description]); if (error != nil) { LogNSError("ModeSelect SupportedModes read Error", error); @@ -35376,7 +35363,7 @@ class ReadModeSelectCurrentMode : public ReadAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.CurrentMode response %@", [value description]); if (error != nil) { LogNSError("ModeSelect CurrentMode read Error", error); @@ -35442,7 +35429,7 @@ class ReadModeSelectStartUpMode : public ReadAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StartUpMode response %@", [value description]); if (error != nil) { LogNSError("ModeSelect StartUpMode read Error", error); @@ -35480,12 +35467,12 @@ class WriteModeSelectStartUpMode : public WriteAttribute { [cluster writeAttributeStartUpModeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ModeSelect StartUpMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ModeSelect StartUpMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -35548,7 +35535,7 @@ class ReadModeSelectOnMode : public ReadAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.OnMode response %@", [value description]); if (error != nil) { LogNSError("ModeSelect OnMode read Error", error); @@ -35586,12 +35573,12 @@ class WriteModeSelectOnMode : public WriteAttribute { [cluster writeAttributeOnModeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ModeSelect OnMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ModeSelect OnMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -35654,7 +35641,7 @@ class ReadModeSelectGeneratedCommandList : public ReadAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ModeSelect GeneratedCommandList read Error", error); @@ -35720,7 +35707,7 @@ class ReadModeSelectAcceptedCommandList : public ReadAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ModeSelect AcceptedCommandList read Error", error); @@ -35786,7 +35773,7 @@ class ReadModeSelectAttributeList : public ReadAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ModeSelect AttributeList read Error", error); @@ -35852,7 +35839,7 @@ class ReadModeSelectFeatureMap : public ReadAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ModeSelect FeatureMap read Error", error); @@ -35918,7 +35905,7 @@ class ReadModeSelectClusterRevision : public ReadAttribute { MTRBaseClusterModeSelect * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ModeSelect ClusterRevision read Error", error); @@ -36070,16 +36057,16 @@ class DoorLockLockDoor : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36120,16 +36107,16 @@ class DoorLockUnlockDoor : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36172,16 +36159,16 @@ class DoorLockUnlockWithTimeout : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster unlockWithTimeoutWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36230,16 +36217,16 @@ class DoorLockSetWeekDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36278,18 +36265,18 @@ class DoorLockGetWeekDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getWeekDayScheduleWithParams:params - completionHandler:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36328,16 +36315,16 @@ class DoorLockClearWeekDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36380,16 +36367,16 @@ class DoorLockSetYearDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36428,18 +36415,18 @@ class DoorLockGetYearDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getYearDayScheduleWithParams:params - completionHandler:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36478,16 +36465,16 @@ class DoorLockClearYearDaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36530,16 +36517,16 @@ class DoorLockSetHolidaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36576,18 +36563,18 @@ class DoorLockGetHolidaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getHolidayScheduleWithParams:params - completionHandler:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36624,16 +36611,16 @@ class DoorLockClearHolidaySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36704,16 +36691,16 @@ class DoorLockSetUser : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36750,17 +36737,17 @@ class DoorLockGetUser : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36797,16 +36784,16 @@ class DoorLockClearUser : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36869,18 +36856,18 @@ class DoorLockSetCredential : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setCredentialWithParams:params - completionHandler:^( - MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36922,18 +36909,18 @@ class DoorLockGetCredentialStatus : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getCredentialStatusWithParams:params - completionHandler:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -36979,16 +36966,16 @@ class DoorLockClearCredential : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -37019,7 +37006,7 @@ class ReadDoorLockLockState : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockState response %@", [value description]); if (error != nil) { LogNSError("DoorLock LockState read Error", error); @@ -37085,7 +37072,7 @@ class ReadDoorLockLockType : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockType response %@", [value description]); if (error != nil) { LogNSError("DoorLock LockType read Error", error); @@ -37151,7 +37138,7 @@ class ReadDoorLockActuatorEnabled : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActuatorEnabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); if (error != nil) { LogNSError("DoorLock ActuatorEnabled read Error", error); @@ -37217,7 +37204,7 @@ class ReadDoorLockDoorState : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorState response %@", [value description]); if (error != nil) { LogNSError("DoorLock DoorState read Error", error); @@ -37283,7 +37270,7 @@ class ReadDoorLockDoorOpenEvents : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorOpenEventsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); if (error != nil) { LogNSError("DoorLock DoorOpenEvents read Error", error); @@ -37321,12 +37308,12 @@ class WriteDoorLockDoorOpenEvents : public WriteAttribute { [cluster writeAttributeDoorOpenEventsWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock DoorOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -37389,7 +37376,7 @@ class ReadDoorLockDoorClosedEvents : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorClosedEventsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); if (error != nil) { LogNSError("DoorLock DoorClosedEvents read Error", error); @@ -37427,12 +37414,12 @@ class WriteDoorLockDoorClosedEvents : public WriteAttribute { [cluster writeAttributeDoorClosedEventsWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock DoorClosedEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorClosedEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -37495,7 +37482,7 @@ class ReadDoorLockOpenPeriod : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOpenPeriodWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OpenPeriod response %@", [value description]); if (error != nil) { LogNSError("DoorLock OpenPeriod read Error", error); @@ -37533,12 +37520,12 @@ class WriteDoorLockOpenPeriod : public WriteAttribute { [cluster writeAttributeOpenPeriodWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock OpenPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock OpenPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -37601,14 +37588,13 @@ class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -37668,14 +37654,13 @@ class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeNumberOfPINUsersSupportedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -37735,14 +37720,13 @@ class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -37802,7 +37786,7 @@ class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribut MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:^( + [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); if (error != nil) { @@ -37870,7 +37854,7 @@ class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribut MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:^( + [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); if (error != nil) { @@ -37938,14 +37922,14 @@ class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -38005,7 +37989,7 @@ class ReadDoorLockMaxPINCodeLength : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPINCodeLengthWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); if (error != nil) { LogNSError("DoorLock MaxPINCodeLength read Error", error); @@ -38071,7 +38055,7 @@ class ReadDoorLockMinPINCodeLength : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinPINCodeLengthWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); if (error != nil) { LogNSError("DoorLock MinPINCodeLength read Error", error); @@ -38137,7 +38121,7 @@ class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxRFIDCodeLengthWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); if (error != nil) { LogNSError("DoorLock MaxRFIDCodeLength read Error", error); @@ -38203,7 +38187,7 @@ class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinRFIDCodeLengthWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); if (error != nil) { LogNSError("DoorLock MinRFIDCodeLength read Error", error); @@ -38269,7 +38253,7 @@ class ReadDoorLockCredentialRulesSupport : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCredentialRulesSupportWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); if (error != nil) { LogNSError("DoorLock CredentialRulesSupport read Error", error); @@ -38335,7 +38319,7 @@ class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:^( + [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); if (error != nil) { @@ -38402,7 +38386,7 @@ class ReadDoorLockLanguage : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLanguageWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.Language response %@", [value description]); if (error != nil) { LogNSError("DoorLock Language read Error", error); @@ -38442,12 +38426,12 @@ class WriteDoorLockLanguage : public WriteAttribute { [cluster writeAttributeLanguageWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock Language write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock Language write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -38510,7 +38494,7 @@ class ReadDoorLockLEDSettings : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLEDSettingsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LEDSettings response %@", [value description]); if (error != nil) { LogNSError("DoorLock LEDSettings read Error", error); @@ -38548,12 +38532,12 @@ class WriteDoorLockLEDSettings : public WriteAttribute { [cluster writeAttributeLEDSettingsWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LEDSettings write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LEDSettings write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -38616,7 +38600,7 @@ class ReadDoorLockAutoRelockTime : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAutoRelockTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); if (error != nil) { LogNSError("DoorLock AutoRelockTime read Error", error); @@ -38654,12 +38638,12 @@ class WriteDoorLockAutoRelockTime : public WriteAttribute { [cluster writeAttributeAutoRelockTimeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock AutoRelockTime write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock AutoRelockTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -38722,7 +38706,7 @@ class ReadDoorLockSoundVolume : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoundVolumeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SoundVolume response %@", [value description]); if (error != nil) { LogNSError("DoorLock SoundVolume read Error", error); @@ -38760,12 +38744,12 @@ class WriteDoorLockSoundVolume : public WriteAttribute { [cluster writeAttributeSoundVolumeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SoundVolume write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SoundVolume write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -38828,7 +38812,7 @@ class ReadDoorLockOperatingMode : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperatingModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OperatingMode response %@", [value description]); if (error != nil) { LogNSError("DoorLock OperatingMode read Error", error); @@ -38866,12 +38850,12 @@ class WriteDoorLockOperatingMode : public WriteAttribute { [cluster writeAttributeOperatingModeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock OperatingMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock OperatingMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -38934,14 +38918,13 @@ class ReadDoorLockSupportedOperatingModes : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeSupportedOperatingModesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock SupportedOperatingModes read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock SupportedOperatingModes read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -39001,8 +38984,7 @@ class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultConfigurationRegisterWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); if (error != nil) { LogNSError("DoorLock DefaultConfigurationRegister read Error", error); @@ -39068,7 +39050,7 @@ class ReadDoorLockEnableLocalProgramming : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableLocalProgrammingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); if (error != nil) { LogNSError("DoorLock EnableLocalProgramming read Error", error); @@ -39106,12 +39088,12 @@ class WriteDoorLockEnableLocalProgramming : public WriteAttribute { [cluster writeAttributeEnableLocalProgrammingWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableLocalProgramming write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableLocalProgramming write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39174,7 +39156,7 @@ class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableOneTouchLockingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); if (error != nil) { LogNSError("DoorLock EnableOneTouchLocking read Error", error); @@ -39212,12 +39194,12 @@ class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { [cluster writeAttributeEnableOneTouchLockingWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableOneTouchLocking write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableOneTouchLocking write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39280,7 +39262,7 @@ class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableInsideStatusLEDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); if (error != nil) { LogNSError("DoorLock EnableInsideStatusLED read Error", error); @@ -39318,12 +39300,12 @@ class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { [cluster writeAttributeEnableInsideStatusLEDWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableInsideStatusLED write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableInsideStatusLED write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39386,14 +39368,13 @@ class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeEnablePrivacyModeButtonWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock EnablePrivacyModeButton read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock EnablePrivacyModeButton read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -39425,12 +39406,12 @@ class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { [cluster writeAttributeEnablePrivacyModeButtonWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnablePrivacyModeButton write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnablePrivacyModeButton write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39493,14 +39474,13 @@ class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeLocalProgrammingFeaturesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock LocalProgrammingFeatures read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock LocalProgrammingFeatures read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -39532,12 +39512,12 @@ class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { [cluster writeAttributeLocalProgrammingFeaturesWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LocalProgrammingFeatures write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LocalProgrammingFeatures write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39600,7 +39580,7 @@ class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWrongCodeEntryLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); if (error != nil) { LogNSError("DoorLock WrongCodeEntryLimit read Error", error); @@ -39638,12 +39618,12 @@ class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { [cluster writeAttributeWrongCodeEntryLimitWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock WrongCodeEntryLimit write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock WrongCodeEntryLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39706,8 +39686,7 @@ class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); if (error != nil) { LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); @@ -39743,14 +39722,15 @@ class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeUserCodeTemporaryDisableTimeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39813,7 +39793,7 @@ class ReadDoorLockSendPINOverTheAir : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSendPINOverTheAirWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); if (error != nil) { LogNSError("DoorLock SendPINOverTheAir read Error", error); @@ -39851,12 +39831,12 @@ class WriteDoorLockSendPINOverTheAir : public WriteAttribute { [cluster writeAttributeSendPINOverTheAirWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SendPINOverTheAir write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SendPINOverTheAir write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -39919,8 +39899,7 @@ class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRequirePINforRemoteOperationWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); if (error != nil) { LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); @@ -39956,14 +39935,15 @@ class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - [cluster writeAttributeRequirePINforRemoteOperationWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeRequirePINforRemoteOperationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -40026,7 +40006,7 @@ class ReadDoorLockExpiringUserTimeout : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpiringUserTimeoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); if (error != nil) { LogNSError("DoorLock ExpiringUserTimeout read Error", error); @@ -40064,12 +40044,12 @@ class WriteDoorLockExpiringUserTimeout : public WriteAttribute { [cluster writeAttributeExpiringUserTimeoutWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock ExpiringUserTimeout write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock ExpiringUserTimeout write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -40132,7 +40112,7 @@ class ReadDoorLockGeneratedCommandList : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("DoorLock GeneratedCommandList read Error", error); @@ -40198,7 +40178,7 @@ class ReadDoorLockAcceptedCommandList : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("DoorLock AcceptedCommandList read Error", error); @@ -40264,7 +40244,7 @@ class ReadDoorLockAttributeList : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AttributeList response %@", [value description]); if (error != nil) { LogNSError("DoorLock AttributeList read Error", error); @@ -40330,7 +40310,7 @@ class ReadDoorLockFeatureMap : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("DoorLock FeatureMap read Error", error); @@ -40396,7 +40376,7 @@ class ReadDoorLockClusterRevision : public ReadAttribute { MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("DoorLock ClusterRevision read Error", error); @@ -40512,16 +40492,16 @@ class WindowCoveringUpOrOpen : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster upOrOpenWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40555,16 +40535,16 @@ class WindowCoveringDownOrClose : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster downOrCloseWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40598,16 +40578,16 @@ class WindowCoveringStopMotion : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopMotionWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40643,16 +40623,16 @@ class WindowCoveringGoToLiftValue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster goToLiftValueWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40689,16 +40669,16 @@ class WindowCoveringGoToLiftPercentage : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster goToLiftPercentageWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40735,16 +40715,16 @@ class WindowCoveringGoToTiltValue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster goToTiltValueWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40781,16 +40761,16 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster goToTiltPercentageWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -40819,7 +40799,7 @@ class ReadWindowCoveringType : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Type response %@", [value description]); if (error != nil) { LogNSError("WindowCovering Type read Error", error); @@ -40885,14 +40865,13 @@ class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributePhysicalClosedLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -40952,14 +40931,13 @@ class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributePhysicalClosedLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -41019,7 +40997,7 @@ class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); if (error != nil) { LogNSError("WindowCovering CurrentPositionLift read Error", error); @@ -41085,7 +41063,7 @@ class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); if (error != nil) { LogNSError("WindowCovering CurrentPositionTilt read Error", error); @@ -41151,7 +41129,7 @@ class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); if (error != nil) { LogNSError("WindowCovering NumberOfActuationsLift read Error", error); @@ -41217,7 +41195,7 @@ class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); if (error != nil) { LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); @@ -41283,7 +41261,7 @@ class ReadWindowCoveringConfigStatus : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); if (error != nil) { LogNSError("WindowCovering ConfigStatus read Error", error); @@ -41349,8 +41327,7 @@ class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); if (error != nil) { LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); @@ -41416,8 +41393,7 @@ class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); if (error != nil) { LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); @@ -41483,7 +41459,7 @@ class ReadWindowCoveringOperationalStatus : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); if (error != nil) { LogNSError("WindowCovering OperationalStatus read Error", error); @@ -41549,14 +41525,14 @@ class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -41616,14 +41592,14 @@ class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -41683,7 +41659,7 @@ class ReadWindowCoveringEndProductType : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEndProductTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EndProductType response %@", [value description]); if (error != nil) { LogNSError("WindowCovering EndProductType read Error", error); @@ -41749,14 +41725,14 @@ class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -41816,14 +41792,14 @@ class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -41883,7 +41859,7 @@ class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); if (error != nil) { LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); @@ -41949,14 +41925,13 @@ class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeInstalledClosedLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -42016,7 +41991,7 @@ class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); if (error != nil) { LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); @@ -42082,14 +42057,13 @@ class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeInstalledClosedLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -42149,7 +42123,7 @@ class ReadWindowCoveringMode : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Mode response %@", [value description]); if (error != nil) { LogNSError("WindowCovering Mode read Error", error); @@ -42187,12 +42161,12 @@ class WriteWindowCoveringMode : public WriteAttribute { [cluster writeAttributeModeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("WindowCovering Mode write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("WindowCovering Mode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -42255,7 +42229,7 @@ class ReadWindowCoveringSafetyStatus : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSafetyStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); if (error != nil) { LogNSError("WindowCovering SafetyStatus read Error", error); @@ -42321,7 +42295,7 @@ class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("WindowCovering GeneratedCommandList read Error", error); @@ -42387,7 +42361,7 @@ class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("WindowCovering AcceptedCommandList read Error", error); @@ -42453,7 +42427,7 @@ class ReadWindowCoveringAttributeList : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AttributeList response %@", [value description]); if (error != nil) { LogNSError("WindowCovering AttributeList read Error", error); @@ -42519,7 +42493,7 @@ class ReadWindowCoveringFeatureMap : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("WindowCovering FeatureMap read Error", error); @@ -42585,7 +42559,7 @@ class ReadWindowCoveringClusterRevision : public ReadAttribute { MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("WindowCovering ClusterRevision read Error", error); @@ -42686,16 +42660,16 @@ class BarrierControlBarrierControlGoToPercent : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster barrierControlGoToPercentWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -42730,16 +42704,16 @@ class BarrierControlBarrierControlStop : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster barrierControlStopWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -42767,7 +42741,7 @@ class ReadBarrierControlBarrierMovingState : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierMovingStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierMovingState read Error", error); @@ -42833,7 +42807,7 @@ class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierSafetyStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierSafetyStatus read Error", error); @@ -42899,7 +42873,7 @@ class ReadBarrierControlBarrierCapabilities : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierCapabilitiesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierCapabilities read Error", error); @@ -42965,7 +42939,7 @@ class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierOpenEventsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierOpenEvents read Error", error); @@ -43003,12 +42977,12 @@ class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { [cluster writeAttributeBarrierOpenEventsWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43071,7 +43045,7 @@ class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierCloseEventsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierCloseEvents read Error", error); @@ -43109,12 +43083,12 @@ class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { [cluster writeAttributeBarrierCloseEventsWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCloseEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCloseEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43177,14 +43151,13 @@ class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeBarrierCommandOpenEventsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierCommandOpenEvents read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); + if (error != nil) { + LogNSError("BarrierControl BarrierCommandOpenEvents read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -43214,14 +43187,15 @@ class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeBarrierCommandOpenEventsWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeBarrierCommandOpenEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43284,14 +43258,13 @@ class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeBarrierCommandCloseEventsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierCommandCloseEvents read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); + if (error != nil) { + LogNSError("BarrierControl BarrierCommandCloseEvents read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -43321,14 +43294,15 @@ class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeBarrierCommandCloseEventsWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeBarrierCommandCloseEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43391,7 +43365,7 @@ class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierOpenPeriodWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierOpenPeriod read Error", error); @@ -43429,12 +43403,12 @@ class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { [cluster writeAttributeBarrierOpenPeriodWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierOpenPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43497,7 +43471,7 @@ class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierClosePeriodWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierClosePeriod read Error", error); @@ -43535,12 +43509,12 @@ class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { [cluster writeAttributeBarrierClosePeriodWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierClosePeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierClosePeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -43603,7 +43577,7 @@ class ReadBarrierControlBarrierPosition : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); if (error != nil) { LogNSError("BarrierControl BarrierPosition read Error", error); @@ -43669,7 +43643,7 @@ class ReadBarrierControlGeneratedCommandList : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("BarrierControl GeneratedCommandList read Error", error); @@ -43735,7 +43709,7 @@ class ReadBarrierControlAcceptedCommandList : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("BarrierControl AcceptedCommandList read Error", error); @@ -43801,7 +43775,7 @@ class ReadBarrierControlAttributeList : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("BarrierControl AttributeList read Error", error); @@ -43867,7 +43841,7 @@ class ReadBarrierControlFeatureMap : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("BarrierControl FeatureMap read Error", error); @@ -43933,7 +43907,7 @@ class ReadBarrierControlClusterRevision : public ReadAttribute { MTRBaseClusterBarrierControl * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("BarrierControl ClusterRevision read Error", error); @@ -44053,7 +44027,7 @@ class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); @@ -44117,7 +44091,7 @@ class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); @@ -44181,7 +44155,7 @@ class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); @@ -44245,7 +44219,7 @@ class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); @@ -44309,7 +44283,7 @@ class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); @@ -44373,7 +44347,7 @@ class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); @@ -44437,7 +44411,7 @@ class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); @@ -44501,7 +44475,7 @@ class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); @@ -44565,7 +44539,7 @@ class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); @@ -44629,7 +44603,7 @@ class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); @@ -44693,7 +44667,7 @@ class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); @@ -44757,7 +44731,7 @@ class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); @@ -44821,7 +44795,7 @@ class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); @@ -44885,7 +44859,7 @@ class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePumpStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); @@ -44949,7 +44923,7 @@ class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribu dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); @@ -45013,7 +44987,7 @@ class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); @@ -45077,7 +45051,7 @@ class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl Capacity read Error", error); @@ -45141,7 +45115,7 @@ class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl Speed read Error", error); @@ -45205,7 +45179,7 @@ class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); @@ -45240,15 +45214,15 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - [cluster - writeAttributeLifetimeRunningHoursWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLifetimeRunningHoursWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -45309,7 +45283,7 @@ class ReadPumpConfigurationAndControlPower : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl Power read Error", error); @@ -45373,7 +45347,7 @@ class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribu dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); @@ -45411,12 +45385,13 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri [cluster writeAttributeLifetimeEnergyConsumedWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -45477,7 +45452,7 @@ class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl OperationMode read Error", error); @@ -45514,12 +45489,12 @@ class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { [cluster writeAttributeOperationModeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl OperationMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl OperationMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -45580,7 +45555,7 @@ class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl ControlMode read Error", error); @@ -45617,12 +45592,12 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute { [cluster writeAttributeControlModeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl ControlMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl ControlMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -45683,7 +45658,7 @@ class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); @@ -45747,7 +45722,7 @@ class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); @@ -45811,7 +45786,7 @@ class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl AttributeList read Error", error); @@ -45875,7 +45850,7 @@ class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); @@ -45939,7 +45914,7 @@ class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterPumpConfigurationAndControl * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); @@ -46082,16 +46057,16 @@ class ThermostatSetpointRaiseLower : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setpointRaiseLowerWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -46154,16 +46129,16 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster setWeeklyScheduleWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -46205,18 +46180,18 @@ class ThermostatGetWeeklySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getWeeklyScheduleWithParams:params - completionHandler:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -46251,16 +46226,16 @@ class ThermostatClearWeeklySchedule : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster clearWeeklyScheduleWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -46288,7 +46263,7 @@ class ReadThermostatLocalTemperature : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperature response %@", [value description]); if (error != nil) { LogNSError("Thermostat LocalTemperature read Error", error); @@ -46354,7 +46329,7 @@ class ReadThermostatOutdoorTemperature : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOutdoorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); if (error != nil) { LogNSError("Thermostat OutdoorTemperature read Error", error); @@ -46420,7 +46395,7 @@ class ReadThermostatOccupancy : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.Occupancy response %@", [value description]); if (error != nil) { LogNSError("Thermostat Occupancy read Error", error); @@ -46486,14 +46461,13 @@ class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -46553,14 +46527,13 @@ class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -46620,14 +46593,13 @@ class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -46687,14 +46659,13 @@ class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -46754,7 +46725,7 @@ class ReadThermostatPICoolingDemand : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePICoolingDemandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); if (error != nil) { LogNSError("Thermostat PICoolingDemand read Error", error); @@ -46820,7 +46791,7 @@ class ReadThermostatPIHeatingDemand : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePIHeatingDemandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); if (error != nil) { LogNSError("Thermostat PIHeatingDemand read Error", error); @@ -46886,14 +46857,13 @@ class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeHVACSystemTypeConfigurationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -46923,14 +46893,15 @@ class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeHVACSystemTypeConfigurationWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeHVACSystemTypeConfigurationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -46993,14 +46964,13 @@ class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeLocalTemperatureCalibrationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat LocalTemperatureCalibration read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat LocalTemperatureCalibration read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -47030,14 +47000,15 @@ class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; - [cluster writeAttributeLocalTemperatureCalibrationWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat LocalTemperatureCalibration write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeLocalTemperatureCalibrationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat LocalTemperatureCalibration write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47100,14 +47071,13 @@ class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeOccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -47139,12 +47109,12 @@ class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { [cluster writeAttributeOccupiedCoolingSetpointWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47207,14 +47177,13 @@ class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeOccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -47246,12 +47215,12 @@ class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { [cluster writeAttributeOccupiedHeatingSetpointWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47314,14 +47283,13 @@ class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -47351,14 +47319,15 @@ class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeUnoccupiedCoolingSetpointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47421,14 +47390,13 @@ class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -47458,14 +47426,15 @@ class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeUnoccupiedHeatingSetpointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47528,7 +47497,7 @@ class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); if (error != nil) { LogNSError("Thermostat MinHeatSetpointLimit read Error", error); @@ -47566,12 +47535,12 @@ class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { [cluster writeAttributeMinHeatSetpointLimitWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinHeatSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinHeatSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47634,7 +47603,7 @@ class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxHeatSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); if (error != nil) { LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); @@ -47672,12 +47641,12 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { [cluster writeAttributeMaxHeatSetpointLimitWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47740,7 +47709,7 @@ class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); if (error != nil) { LogNSError("Thermostat MinCoolSetpointLimit read Error", error); @@ -47778,12 +47747,12 @@ class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { [cluster writeAttributeMinCoolSetpointLimitWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinCoolSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinCoolSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47846,7 +47815,7 @@ class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxCoolSetpointLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); if (error != nil) { LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); @@ -47884,12 +47853,12 @@ class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { [cluster writeAttributeMaxCoolSetpointLimitWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47952,7 +47921,7 @@ class ReadThermostatMinSetpointDeadBand : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinSetpointDeadBandWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); if (error != nil) { LogNSError("Thermostat MinSetpointDeadBand read Error", error); @@ -47990,12 +47959,12 @@ class WriteThermostatMinSetpointDeadBand : public WriteAttribute { [cluster writeAttributeMinSetpointDeadBandWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinSetpointDeadBand write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinSetpointDeadBand write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48058,7 +48027,7 @@ class ReadThermostatRemoteSensing : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemoteSensingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.RemoteSensing response %@", [value description]); if (error != nil) { LogNSError("Thermostat RemoteSensing read Error", error); @@ -48096,12 +48065,12 @@ class WriteThermostatRemoteSensing : public WriteAttribute { [cluster writeAttributeRemoteSensingWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat RemoteSensing write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat RemoteSensing write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48164,14 +48133,13 @@ class ReadThermostatControlSequenceOfOperation : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeControlSequenceOfOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ControlSequenceOfOperation read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ControlSequenceOfOperation read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -48201,14 +48169,15 @@ class WriteThermostatControlSequenceOfOperation : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeControlSequenceOfOperationWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ControlSequenceOfOperation write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeControlSequenceOfOperationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ControlSequenceOfOperation write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48271,7 +48240,7 @@ class ReadThermostatSystemMode : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSystemModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SystemMode response %@", [value description]); if (error != nil) { LogNSError("Thermostat SystemMode read Error", error); @@ -48309,12 +48278,12 @@ class WriteThermostatSystemMode : public WriteAttribute { [cluster writeAttributeSystemModeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat SystemMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat SystemMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48377,7 +48346,7 @@ class ReadThermostatThermostatRunningMode : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatRunningModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); if (error != nil) { LogNSError("Thermostat ThermostatRunningMode read Error", error); @@ -48443,7 +48412,7 @@ class ReadThermostatStartOfWeek : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartOfWeekWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.StartOfWeek response %@", [value description]); if (error != nil) { LogNSError("Thermostat StartOfWeek read Error", error); @@ -48509,14 +48478,13 @@ class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -48576,14 +48544,13 @@ class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeNumberOfDailyTransitionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat NumberOfDailyTransitions read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat NumberOfDailyTransitions read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -48643,14 +48610,13 @@ class ReadThermostatTemperatureSetpointHold : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeTemperatureSetpointHoldWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHold read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHold read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -48682,12 +48648,12 @@ class WriteThermostatTemperatureSetpointHold : public WriteAttribute { [cluster writeAttributeTemperatureSetpointHoldWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHold write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHold write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48750,14 +48716,14 @@ class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -48787,15 +48753,16 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeTemperatureSetpointHoldDurationWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "Thermostat TemperatureSetpointHoldDuration write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeTemperatureSetpointHoldDurationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48858,14 +48825,14 @@ class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatProgrammingOperationModeWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -48898,13 +48865,14 @@ class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute [cluster writeAttributeThermostatProgrammingOperationModeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "Thermostat ThermostatProgrammingOperationMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "Thermostat ThermostatProgrammingOperationMode write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -48967,7 +48935,7 @@ class ReadThermostatThermostatRunningState : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatRunningStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); if (error != nil) { LogNSError("Thermostat ThermostatRunningState read Error", error); @@ -49033,7 +49001,7 @@ class ReadThermostatSetpointChangeSource : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); if (error != nil) { LogNSError("Thermostat SetpointChangeSource read Error", error); @@ -49099,7 +49067,7 @@ class ReadThermostatSetpointChangeAmount : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeAmountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); if (error != nil) { LogNSError("Thermostat SetpointChangeAmount read Error", error); @@ -49165,8 +49133,7 @@ class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceTimestampWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); if (error != nil) { LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); @@ -49232,7 +49199,7 @@ class ReadThermostatOccupiedSetback : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); if (error != nil) { LogNSError("Thermostat OccupiedSetback read Error", error); @@ -49270,12 +49237,12 @@ class WriteThermostatOccupiedSetback : public WriteAttribute { [cluster writeAttributeOccupiedSetbackWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedSetback write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedSetback write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -49338,7 +49305,7 @@ class ReadThermostatOccupiedSetbackMin : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); if (error != nil) { LogNSError("Thermostat OccupiedSetbackMin read Error", error); @@ -49404,7 +49371,7 @@ class ReadThermostatOccupiedSetbackMax : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); if (error != nil) { LogNSError("Thermostat OccupiedSetbackMax read Error", error); @@ -49470,7 +49437,7 @@ class ReadThermostatUnoccupiedSetback : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); if (error != nil) { LogNSError("Thermostat UnoccupiedSetback read Error", error); @@ -49508,12 +49475,12 @@ class WriteThermostatUnoccupiedSetback : public WriteAttribute { [cluster writeAttributeUnoccupiedSetbackWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedSetback write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedSetback write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -49576,7 +49543,7 @@ class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); if (error != nil) { LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); @@ -49642,7 +49609,7 @@ class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); if (error != nil) { LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); @@ -49708,7 +49675,7 @@ class ReadThermostatEmergencyHeatDelta : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEmergencyHeatDeltaWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); if (error != nil) { LogNSError("Thermostat EmergencyHeatDelta read Error", error); @@ -49746,12 +49713,12 @@ class WriteThermostatEmergencyHeatDelta : public WriteAttribute { [cluster writeAttributeEmergencyHeatDeltaWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat EmergencyHeatDelta write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat EmergencyHeatDelta write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -49814,7 +49781,7 @@ class ReadThermostatACType : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACType response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACType read Error", error); @@ -49852,12 +49819,12 @@ class WriteThermostatACType : public WriteAttribute { [cluster writeAttributeACTypeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACType write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACType write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -49920,7 +49887,7 @@ class ReadThermostatACCapacity : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacity response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACCapacity read Error", error); @@ -49958,12 +49925,12 @@ class WriteThermostatACCapacity : public WriteAttribute { [cluster writeAttributeACCapacityWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacity write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCapacity write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50026,7 +49993,7 @@ class ReadThermostatACRefrigerantType : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACRefrigerantTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACRefrigerantType read Error", error); @@ -50064,12 +50031,12 @@ class WriteThermostatACRefrigerantType : public WriteAttribute { [cluster writeAttributeACRefrigerantTypeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACRefrigerantType write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACRefrigerantType write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50132,7 +50099,7 @@ class ReadThermostatACCompressorType : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCompressorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCompressorType response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACCompressorType read Error", error); @@ -50170,12 +50137,12 @@ class WriteThermostatACCompressorType : public WriteAttribute { [cluster writeAttributeACCompressorTypeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCompressorType write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCompressorType write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50238,7 +50205,7 @@ class ReadThermostatACErrorCode : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACErrorCodeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACErrorCode response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACErrorCode read Error", error); @@ -50276,12 +50243,12 @@ class WriteThermostatACErrorCode : public WriteAttribute { [cluster writeAttributeACErrorCodeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACErrorCode write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACErrorCode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50344,7 +50311,7 @@ class ReadThermostatACLouverPosition : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACLouverPositionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACLouverPosition read Error", error); @@ -50382,12 +50349,12 @@ class WriteThermostatACLouverPosition : public WriteAttribute { [cluster writeAttributeACLouverPositionWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACLouverPosition write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACLouverPosition write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50450,7 +50417,7 @@ class ReadThermostatACCoilTemperature : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCoilTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACCoilTemperature read Error", error); @@ -50516,7 +50483,7 @@ class ReadThermostatACCapacityformat : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCapacityformatWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); if (error != nil) { LogNSError("Thermostat ACCapacityformat read Error", error); @@ -50554,12 +50521,12 @@ class WriteThermostatACCapacityformat : public WriteAttribute { [cluster writeAttributeACCapacityformatWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacityformat write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCapacityformat write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -50622,7 +50589,7 @@ class ReadThermostatGeneratedCommandList : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Thermostat GeneratedCommandList read Error", error); @@ -50688,7 +50655,7 @@ class ReadThermostatAcceptedCommandList : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Thermostat AcceptedCommandList read Error", error); @@ -50754,7 +50721,7 @@ class ReadThermostatAttributeList : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Thermostat AttributeList read Error", error); @@ -50820,7 +50787,7 @@ class ReadThermostatFeatureMap : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Thermostat FeatureMap read Error", error); @@ -50886,7 +50853,7 @@ class ReadThermostatClusterRevision : public ReadAttribute { MTRBaseClusterThermostat * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Thermostat ClusterRevision read Error", error); @@ -50978,7 +50945,7 @@ class ReadFanControlFanMode : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFanModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanMode response %@", [value description]); if (error != nil) { LogNSError("FanControl FanMode read Error", error); @@ -51016,12 +50983,12 @@ class WriteFanControlFanMode : public WriteAttribute { [cluster writeAttributeFanModeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl FanMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl FanMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -51084,7 +51051,7 @@ class ReadFanControlFanModeSequence : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFanModeSequenceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanModeSequence response %@", [value description]); if (error != nil) { LogNSError("FanControl FanModeSequence read Error", error); @@ -51122,12 +51089,12 @@ class WriteFanControlFanModeSequence : public WriteAttribute { [cluster writeAttributeFanModeSequenceWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl FanModeSequence write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl FanModeSequence write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -51190,7 +51157,7 @@ class ReadFanControlPercentSetting : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentSetting response %@", [value description]); if (error != nil) { LogNSError("FanControl PercentSetting read Error", error); @@ -51228,12 +51195,12 @@ class WriteFanControlPercentSetting : public WriteAttribute { [cluster writeAttributePercentSettingWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl PercentSetting write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl PercentSetting write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -51296,7 +51263,7 @@ class ReadFanControlPercentCurrent : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePercentCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentCurrent response %@", [value description]); if (error != nil) { LogNSError("FanControl PercentCurrent read Error", error); @@ -51362,7 +51329,7 @@ class ReadFanControlSpeedMax : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedMax response %@", [value description]); if (error != nil) { LogNSError("FanControl SpeedMax read Error", error); @@ -51428,7 +51395,7 @@ class ReadFanControlSpeedSetting : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedSetting response %@", [value description]); if (error != nil) { LogNSError("FanControl SpeedSetting read Error", error); @@ -51466,12 +51433,12 @@ class WriteFanControlSpeedSetting : public WriteAttribute { [cluster writeAttributeSpeedSettingWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl SpeedSetting write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl SpeedSetting write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -51534,7 +51501,7 @@ class ReadFanControlSpeedCurrent : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedCurrent response %@", [value description]); if (error != nil) { LogNSError("FanControl SpeedCurrent read Error", error); @@ -51600,7 +51567,7 @@ class ReadFanControlRockSupport : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRockSupportWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSupport response %@", [value description]); if (error != nil) { LogNSError("FanControl RockSupport read Error", error); @@ -51666,7 +51633,7 @@ class ReadFanControlRockSetting : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRockSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSetting response %@", [value description]); if (error != nil) { LogNSError("FanControl RockSetting read Error", error); @@ -51704,12 +51671,12 @@ class WriteFanControlRockSetting : public WriteAttribute { [cluster writeAttributeRockSettingWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl RockSetting write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl RockSetting write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -51772,7 +51739,7 @@ class ReadFanControlWindSupport : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWindSupportWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSupport response %@", [value description]); if (error != nil) { LogNSError("FanControl WindSupport read Error", error); @@ -51838,7 +51805,7 @@ class ReadFanControlWindSetting : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWindSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSetting response %@", [value description]); if (error != nil) { LogNSError("FanControl WindSetting read Error", error); @@ -51876,12 +51843,12 @@ class WriteFanControlWindSetting : public WriteAttribute { [cluster writeAttributeWindSettingWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl WindSetting write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl WindSetting write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -51944,7 +51911,7 @@ class ReadFanControlGeneratedCommandList : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("FanControl GeneratedCommandList read Error", error); @@ -52010,7 +51977,7 @@ class ReadFanControlAcceptedCommandList : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("FanControl AcceptedCommandList read Error", error); @@ -52076,7 +52043,7 @@ class ReadFanControlAttributeList : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("FanControl AttributeList read Error", error); @@ -52142,7 +52109,7 @@ class ReadFanControlFeatureMap : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("FanControl FeatureMap read Error", error); @@ -52208,7 +52175,7 @@ class ReadFanControlClusterRevision : public ReadAttribute { MTRBaseClusterFanControl * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("FanControl ClusterRevision read Error", error); @@ -52293,7 +52260,7 @@ class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public Re [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); @@ -52332,14 +52299,14 @@ class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public W [cluster writeAttributeTemperatureDisplayModeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ThermostatUserInterfaceConfiguration TemperatureDisplayMode write Error", - error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration " + "TemperatureDisplayMode write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -52404,7 +52371,7 @@ class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribu [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); @@ -52441,14 +52408,15 @@ class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttri params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeKeypadLockoutWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeKeypadLockoutWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -52513,8 +52481,7 @@ class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : pu [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); @@ -52553,14 +52520,14 @@ class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : p [cluster writeAttributeScheduleProgrammingVisibilityWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration " - "ScheduleProgrammingVisibility write Error", - error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration " + "ScheduleProgrammingVisibility write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -52625,7 +52592,7 @@ class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public Read [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); @@ -52693,7 +52660,7 @@ class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadA [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); @@ -52761,7 +52728,7 @@ class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribu [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); @@ -52829,7 +52796,7 @@ class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); @@ -52897,7 +52864,7 @@ class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttri [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); @@ -53066,16 +53033,16 @@ class ColorControlMoveToHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToHueWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53118,16 +53085,16 @@ class ColorControlMoveHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveHueWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53172,16 +53139,16 @@ class ColorControlStepHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepHueWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53224,16 +53191,16 @@ class ColorControlMoveToSaturation : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToSaturationWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53276,16 +53243,16 @@ class ColorControlMoveSaturation : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53330,16 +53297,16 @@ class ColorControlStepSaturation : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepSaturationWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53384,16 +53351,16 @@ class ColorControlMoveToHueAndSaturation : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToHueAndSaturationWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53438,16 +53405,16 @@ class ColorControlMoveToColor : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53490,16 +53457,16 @@ class ColorControlMoveColor : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveColorWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53544,16 +53511,16 @@ class ColorControlStepColor : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepColorWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53596,16 +53563,16 @@ class ColorControlMoveToColorTemperature : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveToColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53650,16 +53617,16 @@ class ColorControlEnhancedMoveToHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedMoveToHueWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53702,16 +53669,16 @@ class ColorControlEnhancedMoveHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53756,16 +53723,16 @@ class ColorControlEnhancedStepHue : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedStepHueWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53810,16 +53777,16 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster enhancedMoveToHueAndSaturationWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53868,16 +53835,16 @@ class ColorControlColorLoopSet : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53916,16 +53883,16 @@ class ColorControlStopMoveStep : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopMoveStepWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -53972,16 +53939,16 @@ class ColorControlMoveColorTemperature : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -54030,16 +53997,16 @@ class ColorControlStepColorTemperature : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stepColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -54068,7 +54035,7 @@ class ReadColorControlCurrentHue : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentHue response %@", [value description]); if (error != nil) { LogNSError("ColorControl CurrentHue read Error", error); @@ -54134,7 +54101,7 @@ class ReadColorControlCurrentSaturation : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); if (error != nil) { LogNSError("ColorControl CurrentSaturation read Error", error); @@ -54200,7 +54167,7 @@ class ReadColorControlRemainingTime : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.RemainingTime response %@", [value description]); if (error != nil) { LogNSError("ColorControl RemainingTime read Error", error); @@ -54266,7 +54233,7 @@ class ReadColorControlCurrentX : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentX response %@", [value description]); if (error != nil) { LogNSError("ColorControl CurrentX read Error", error); @@ -54332,7 +54299,7 @@ class ReadColorControlCurrentY : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentY response %@", [value description]); if (error != nil) { LogNSError("ColorControl CurrentY read Error", error); @@ -54398,7 +54365,7 @@ class ReadColorControlDriftCompensation : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDriftCompensationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.DriftCompensation response %@", [value description]); if (error != nil) { LogNSError("ColorControl DriftCompensation read Error", error); @@ -54464,7 +54431,7 @@ class ReadColorControlCompensationText : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCompensationTextWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CompensationText response %@", [value description]); if (error != nil) { LogNSError("ColorControl CompensationText read Error", error); @@ -54530,7 +54497,7 @@ class ReadColorControlColorTemperatureMireds : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorTemperatureMireds read Error", error); @@ -54596,7 +54563,7 @@ class ReadColorControlColorMode : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorMode response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorMode read Error", error); @@ -54662,7 +54629,7 @@ class ReadColorControlOptions : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Options response %@", [value description]); if (error != nil) { LogNSError("ColorControl Options read Error", error); @@ -54700,12 +54667,12 @@ class WriteColorControlOptions : public WriteAttribute { [cluster writeAttributeOptionsWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl Options write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl Options write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -54768,7 +54735,7 @@ class ReadColorControlNumberOfPrimaries : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPrimariesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); if (error != nil) { LogNSError("ColorControl NumberOfPrimaries read Error", error); @@ -54834,7 +54801,7 @@ class ReadColorControlPrimary1X : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary1X read Error", error); @@ -54900,7 +54867,7 @@ class ReadColorControlPrimary1Y : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary1Y read Error", error); @@ -54966,7 +54933,7 @@ class ReadColorControlPrimary1Intensity : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary1Intensity read Error", error); @@ -55032,7 +54999,7 @@ class ReadColorControlPrimary2X : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary2X read Error", error); @@ -55098,7 +55065,7 @@ class ReadColorControlPrimary2Y : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary2Y read Error", error); @@ -55164,7 +55131,7 @@ class ReadColorControlPrimary2Intensity : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary2Intensity read Error", error); @@ -55230,7 +55197,7 @@ class ReadColorControlPrimary3X : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary3X read Error", error); @@ -55296,7 +55263,7 @@ class ReadColorControlPrimary3Y : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary3Y read Error", error); @@ -55362,7 +55329,7 @@ class ReadColorControlPrimary3Intensity : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary3Intensity read Error", error); @@ -55428,7 +55395,7 @@ class ReadColorControlPrimary4X : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary4X read Error", error); @@ -55494,7 +55461,7 @@ class ReadColorControlPrimary4Y : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary4Y read Error", error); @@ -55560,7 +55527,7 @@ class ReadColorControlPrimary4Intensity : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary4Intensity read Error", error); @@ -55626,7 +55593,7 @@ class ReadColorControlPrimary5X : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary5X read Error", error); @@ -55692,7 +55659,7 @@ class ReadColorControlPrimary5Y : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary5Y read Error", error); @@ -55758,7 +55725,7 @@ class ReadColorControlPrimary5Intensity : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary5Intensity read Error", error); @@ -55824,7 +55791,7 @@ class ReadColorControlPrimary6X : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary6XWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6X response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary6X read Error", error); @@ -55890,7 +55857,7 @@ class ReadColorControlPrimary6Y : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary6YWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Y response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary6Y read Error", error); @@ -55956,7 +55923,7 @@ class ReadColorControlPrimary6Intensity : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary6IntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl Primary6Intensity read Error", error); @@ -56022,7 +55989,7 @@ class ReadColorControlWhitePointX : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWhitePointXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointX response %@", [value description]); if (error != nil) { LogNSError("ColorControl WhitePointX read Error", error); @@ -56060,12 +56027,12 @@ class WriteColorControlWhitePointX : public WriteAttribute { [cluster writeAttributeWhitePointXWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl WhitePointX write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointX write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56128,7 +56095,7 @@ class ReadColorControlWhitePointY : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWhitePointYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointY response %@", [value description]); if (error != nil) { LogNSError("ColorControl WhitePointY read Error", error); @@ -56166,12 +56133,12 @@ class WriteColorControlWhitePointY : public WriteAttribute { [cluster writeAttributeWhitePointYWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl WhitePointY write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointY write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56234,7 +56201,7 @@ class ReadColorControlColorPointRX : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointRXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRX response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointRX read Error", error); @@ -56272,12 +56239,12 @@ class WriteColorControlColorPointRX : public WriteAttribute { [cluster writeAttributeColorPointRXWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRX write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRX write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56340,7 +56307,7 @@ class ReadColorControlColorPointRY : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointRYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRY response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointRY read Error", error); @@ -56378,12 +56345,12 @@ class WriteColorControlColorPointRY : public WriteAttribute { [cluster writeAttributeColorPointRYWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRY write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRY write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56446,7 +56413,7 @@ class ReadColorControlColorPointRIntensity : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointRIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointRIntensity read Error", error); @@ -56484,12 +56451,12 @@ class WriteColorControlColorPointRIntensity : public WriteAttribute { [cluster writeAttributeColorPointRIntensityWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRIntensity write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56552,7 +56519,7 @@ class ReadColorControlColorPointGX : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointGXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGX response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointGX read Error", error); @@ -56590,12 +56557,12 @@ class WriteColorControlColorPointGX : public WriteAttribute { [cluster writeAttributeColorPointGXWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGX write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGX write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56658,7 +56625,7 @@ class ReadColorControlColorPointGY : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointGYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGY response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointGY read Error", error); @@ -56696,12 +56663,12 @@ class WriteColorControlColorPointGY : public WriteAttribute { [cluster writeAttributeColorPointGYWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGY write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGY write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56764,7 +56731,7 @@ class ReadColorControlColorPointGIntensity : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointGIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointGIntensity read Error", error); @@ -56802,12 +56769,12 @@ class WriteColorControlColorPointGIntensity : public WriteAttribute { [cluster writeAttributeColorPointGIntensityWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGIntensity write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56870,7 +56837,7 @@ class ReadColorControlColorPointBX : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointBXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBX response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointBX read Error", error); @@ -56908,12 +56875,12 @@ class WriteColorControlColorPointBX : public WriteAttribute { [cluster writeAttributeColorPointBXWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBX write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBX write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -56976,7 +56943,7 @@ class ReadColorControlColorPointBY : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointBYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBY response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointBY read Error", error); @@ -57014,12 +56981,12 @@ class WriteColorControlColorPointBY : public WriteAttribute { [cluster writeAttributeColorPointBYWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBY write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBY write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -57082,7 +57049,7 @@ class ReadColorControlColorPointBIntensity : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointBIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorPointBIntensity read Error", error); @@ -57120,12 +57087,12 @@ class WriteColorControlColorPointBIntensity : public WriteAttribute { [cluster writeAttributeColorPointBIntensityWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBIntensity write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -57188,7 +57155,7 @@ class ReadColorControlEnhancedCurrentHue : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); if (error != nil) { LogNSError("ColorControl EnhancedCurrentHue read Error", error); @@ -57254,7 +57221,7 @@ class ReadColorControlEnhancedColorMode : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); if (error != nil) { LogNSError("ColorControl EnhancedColorMode read Error", error); @@ -57320,7 +57287,7 @@ class ReadColorControlColorLoopActive : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorLoopActive read Error", error); @@ -57386,7 +57353,7 @@ class ReadColorControlColorLoopDirection : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopDirectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorLoopDirection read Error", error); @@ -57452,7 +57419,7 @@ class ReadColorControlColorLoopTime : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorLoopTime read Error", error); @@ -57518,14 +57485,13 @@ class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeColorLoopStartEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -57585,14 +57551,13 @@ class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -57652,7 +57617,7 @@ class ReadColorControlColorCapabilities : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorCapabilitiesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); if (error != nil) { LogNSError("ColorControl ColorCapabilities read Error", error); @@ -57718,14 +57683,13 @@ class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -57785,14 +57749,13 @@ class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -57852,14 +57815,14 @@ class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -57919,8 +57882,7 @@ class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); if (error != nil) { LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); @@ -57959,12 +57921,13 @@ class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl StartUpColorTemperatureMireds write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ColorControl StartUpColorTemperatureMireds write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -58027,7 +57990,7 @@ class ReadColorControlGeneratedCommandList : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ColorControl GeneratedCommandList read Error", error); @@ -58093,7 +58056,7 @@ class ReadColorControlAcceptedCommandList : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ColorControl AcceptedCommandList read Error", error); @@ -58159,7 +58122,7 @@ class ReadColorControlAttributeList : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ColorControl AttributeList read Error", error); @@ -58225,7 +58188,7 @@ class ReadColorControlFeatureMap : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ColorControl FeatureMap read Error", error); @@ -58291,7 +58254,7 @@ class ReadColorControlClusterRevision : public ReadAttribute { MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ColorControl ClusterRevision read Error", error); @@ -58386,7 +58349,7 @@ class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); @@ -58452,7 +58415,7 @@ class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); @@ -58518,7 +58481,7 @@ class ReadBallastConfigurationBallastStatus : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBallastStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration BallastStatus read Error", error); @@ -58584,7 +58547,7 @@ class ReadBallastConfigurationMinLevel : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration MinLevel read Error", error); @@ -58622,12 +58585,12 @@ class WriteBallastConfigurationMinLevel : public WriteAttribute { [cluster writeAttributeMinLevelWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MinLevel write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration MinLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -58690,7 +58653,7 @@ class ReadBallastConfigurationMaxLevel : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration MaxLevel read Error", error); @@ -58728,12 +58691,12 @@ class WriteBallastConfigurationMaxLevel : public WriteAttribute { [cluster writeAttributeMaxLevelWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MaxLevel write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration MaxLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -58796,7 +58759,7 @@ class ReadBallastConfigurationIntrinsicBalanceFactor : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeIntrinsicBalanceFactorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeIntrinsicBalanceFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.IntrinsicBalanceFactor response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration IntrinsicBalanceFactor read Error", error); @@ -58832,14 +58795,15 @@ class WriteBallastConfigurationIntrinsicBalanceFactor : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeIntrinsicBalanceFactorWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration IntrinsicBalanceFactor write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeIntrinsicBalanceFactorWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration IntrinsicBalanceFactor write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -58902,14 +58866,13 @@ class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeBallastFactorAdjustmentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); - if (error != nil) { - LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); + if (error != nil) { + LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -58941,12 +58904,13 @@ class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { [cluster writeAttributeBallastFactorAdjustmentWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration BallastFactorAdjustment write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "BallastConfiguration BallastFactorAdjustment write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59009,7 +58973,7 @@ class ReadBallastConfigurationLampQuantity : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampQuantityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampQuantity read Error", error); @@ -59075,7 +59039,7 @@ class ReadBallastConfigurationLampType : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampTypeWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampType response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampType read Error", error); @@ -59115,12 +59079,12 @@ class WriteBallastConfigurationLampType : public WriteAttribute { [cluster writeAttributeLampTypeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampType write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampType write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59183,7 +59147,7 @@ class ReadBallastConfigurationLampManufacturer : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampManufacturerWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampManufacturer read Error", error); @@ -59223,12 +59187,12 @@ class WriteBallastConfigurationLampManufacturer : public WriteAttribute { [cluster writeAttributeLampManufacturerWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampManufacturer write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampManufacturer write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59291,7 +59255,7 @@ class ReadBallastConfigurationLampRatedHours : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampRatedHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampRatedHours read Error", error); @@ -59329,12 +59293,12 @@ class WriteBallastConfigurationLampRatedHours : public WriteAttribute { [cluster writeAttributeLampRatedHoursWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampRatedHours write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampRatedHours write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59397,7 +59361,7 @@ class ReadBallastConfigurationLampBurnHours : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampBurnHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampBurnHours read Error", error); @@ -59435,12 +59399,12 @@ class WriteBallastConfigurationLampBurnHours : public WriteAttribute { [cluster writeAttributeLampBurnHoursWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHours write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHours write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59503,7 +59467,7 @@ class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampAlarmModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampAlarmMode read Error", error); @@ -59541,12 +59505,12 @@ class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { [cluster writeAttributeLampAlarmModeWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampAlarmMode write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampAlarmMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59609,7 +59573,7 @@ class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampBurnHoursTripPointWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); @@ -59645,14 +59609,15 @@ class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - [cluster writeAttributeLampBurnHoursTripPointWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeLampBurnHoursTripPointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -59715,7 +59680,7 @@ class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration GeneratedCommandList read Error", error); @@ -59781,7 +59746,7 @@ class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration AcceptedCommandList read Error", error); @@ -59847,7 +59812,7 @@ class ReadBallastConfigurationAttributeList : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration AttributeList read Error", error); @@ -59913,7 +59878,7 @@ class ReadBallastConfigurationFeatureMap : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration FeatureMap read Error", error); @@ -59979,7 +59944,7 @@ class ReadBallastConfigurationClusterRevision : public ReadAttribute { MTRBaseClusterBallastConfiguration * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("BallastConfiguration ClusterRevision read Error", error); @@ -60064,7 +60029,7 @@ class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); @@ -60128,7 +60093,7 @@ class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); @@ -60192,7 +60157,7 @@ class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); @@ -60256,7 +60221,7 @@ class ReadIlluminanceMeasurementTolerance : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement Tolerance read Error", error); @@ -60320,7 +60285,7 @@ class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLightSensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement LightSensorType read Error", error); @@ -60384,7 +60349,7 @@ class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); @@ -60448,7 +60413,7 @@ class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); @@ -60512,7 +60477,7 @@ class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement AttributeList read Error", error); @@ -60576,7 +60541,7 @@ class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement FeatureMap read Error", error); @@ -60640,7 +60605,7 @@ class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterIlluminanceMeasurement * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); @@ -60723,7 +60688,7 @@ class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement MeasuredValue read Error", error); @@ -60787,7 +60752,7 @@ class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); @@ -60851,7 +60816,7 @@ class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); @@ -60915,7 +60880,7 @@ class ReadTemperatureMeasurementTolerance : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement Tolerance read Error", error); @@ -60979,7 +60944,7 @@ class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); @@ -61043,7 +61008,7 @@ class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); @@ -61107,7 +61072,7 @@ class ReadTemperatureMeasurementAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement AttributeList read Error", error); @@ -61171,7 +61136,7 @@ class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement FeatureMap read Error", error); @@ -61235,7 +61200,7 @@ class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterTemperatureMeasurement * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("TemperatureMeasurement ClusterRevision read Error", error); @@ -61324,7 +61289,7 @@ class ReadPressureMeasurementMeasuredValue : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement MeasuredValue read Error", error); @@ -61390,7 +61355,7 @@ class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement MinMeasuredValue read Error", error); @@ -61456,7 +61421,7 @@ class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); @@ -61522,7 +61487,7 @@ class ReadPressureMeasurementTolerance : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement Tolerance read Error", error); @@ -61588,7 +61553,7 @@ class ReadPressureMeasurementScaledValue : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement ScaledValue read Error", error); @@ -61654,7 +61619,7 @@ class ReadPressureMeasurementMinScaledValue : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement MinScaledValue read Error", error); @@ -61720,7 +61685,7 @@ class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement MaxScaledValue read Error", error); @@ -61786,7 +61751,7 @@ class ReadPressureMeasurementScaledTolerance : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScaledToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement ScaledTolerance read Error", error); @@ -61852,7 +61817,7 @@ class ReadPressureMeasurementScale : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScaleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Scale response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement Scale read Error", error); @@ -61918,7 +61883,7 @@ class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement GeneratedCommandList read Error", error); @@ -61984,7 +61949,7 @@ class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement AcceptedCommandList read Error", error); @@ -62050,7 +62015,7 @@ class ReadPressureMeasurementAttributeList : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement AttributeList read Error", error); @@ -62116,7 +62081,7 @@ class ReadPressureMeasurementFeatureMap : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement FeatureMap read Error", error); @@ -62182,7 +62147,7 @@ class ReadPressureMeasurementClusterRevision : public ReadAttribute { MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("PressureMeasurement ClusterRevision read Error", error); @@ -62267,7 +62232,7 @@ class ReadFlowMeasurementMeasuredValue : public ReadAttribute { MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement MeasuredValue read Error", error); @@ -62333,7 +62298,7 @@ class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement MinMeasuredValue read Error", error); @@ -62399,7 +62364,7 @@ class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); @@ -62465,7 +62430,7 @@ class ReadFlowMeasurementTolerance : public ReadAttribute { MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement Tolerance read Error", error); @@ -62531,7 +62496,7 @@ class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement GeneratedCommandList read Error", error); @@ -62597,7 +62562,7 @@ class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement AcceptedCommandList read Error", error); @@ -62663,7 +62628,7 @@ class ReadFlowMeasurementAttributeList : public ReadAttribute { MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement AttributeList read Error", error); @@ -62729,7 +62694,7 @@ class ReadFlowMeasurementFeatureMap : public ReadAttribute { MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement FeatureMap read Error", error); @@ -62795,7 +62760,7 @@ class ReadFlowMeasurementClusterRevision : public ReadAttribute { MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("FlowMeasurement ClusterRevision read Error", error); @@ -62879,7 +62844,7 @@ class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); @@ -62943,7 +62908,7 @@ class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); @@ -63007,7 +62972,7 @@ class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); @@ -63071,7 +63036,7 @@ class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); @@ -63135,7 +63100,7 @@ class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); @@ -63199,7 +63164,7 @@ class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); @@ -63263,7 +63228,7 @@ class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); @@ -63327,7 +63292,7 @@ class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); @@ -63391,7 +63356,7 @@ class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); MTRBaseClusterRelativeHumidityMeasurement * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); @@ -63483,7 +63448,7 @@ class ReadOccupancySensingOccupancy : public ReadAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.Occupancy response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing Occupancy read Error", error); @@ -63549,7 +63514,7 @@ class ReadOccupancySensingOccupancySensorType : public ReadAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing OccupancySensorType read Error", error); @@ -63615,14 +63580,13 @@ class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeOccupancySensorTypeBitmapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); + if (error != nil) { + LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -63682,8 +63646,7 @@ class ReadOccupancySensingPirOccupiedToUnoccupiedDelay : public ReadAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePirOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PirOccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing PirOccupiedToUnoccupiedDelay read Error", error); @@ -63719,15 +63682,16 @@ class WriteOccupancySensingPirOccupiedToUnoccupiedDelay : public WriteAttribute params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributePirOccupiedToUnoccupiedDelayWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing PirOccupiedToUnoccupiedDelay write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributePirOccupiedToUnoccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PirOccupiedToUnoccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -63790,8 +63754,7 @@ class ReadOccupancySensingPirUnoccupiedToOccupiedDelay : public ReadAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePirUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PirUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing PirUnoccupiedToOccupiedDelay read Error", error); @@ -63827,15 +63790,16 @@ class WriteOccupancySensingPirUnoccupiedToOccupiedDelay : public WriteAttribute params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributePirUnoccupiedToOccupiedDelayWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing PirUnoccupiedToOccupiedDelay write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributePirUnoccupiedToOccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PirUnoccupiedToOccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -63898,14 +63862,14 @@ class ReadOccupancySensingPirUnoccupiedToOccupiedThreshold : public ReadAttribut MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PirUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing PirUnoccupiedToOccupiedThreshold read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributePirUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PirUnoccupiedToOccupiedThreshold response %@", [value description]); + if (error != nil) { + LogNSError("OccupancySensing PirUnoccupiedToOccupiedThreshold read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -63937,14 +63901,14 @@ class WriteOccupancySensingPirUnoccupiedToOccupiedThreshold : public WriteAttrib [cluster writeAttributePirUnoccupiedToOccupiedThresholdWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing PirUnoccupiedToOccupiedThreshold write Error", - error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "PirUnoccupiedToOccupiedThreshold write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64007,7 +63971,7 @@ class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttri MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:^( + [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { @@ -64047,14 +64011,14 @@ class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAtt [cluster writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing UltrasonicOccupiedToUnoccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "UltrasonicOccupiedToUnoccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64117,7 +64081,7 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttri MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:^( + [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { @@ -64157,14 +64121,14 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAtt [cluster writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing UltrasonicUnoccupiedToOccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "UltrasonicUnoccupiedToOccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64227,7 +64191,7 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadA MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); if (error != nil) { @@ -64267,14 +64231,15 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public Writ [cluster writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing " "UltrasonicUnoccupiedToOccupiedThreshold write Error", - error); - } - SetCommandExitStatus(error); - }]; + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64338,7 +64303,7 @@ class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Read MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { @@ -64378,14 +64343,15 @@ class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Wri [cluster writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing " "PhysicalContactOccupiedToUnoccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64449,7 +64415,7 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Read MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { @@ -64489,14 +64455,15 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Wri [cluster writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing " "PhysicalContactUnoccupiedToOccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64560,7 +64527,7 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); if (error != nil) { @@ -64599,15 +64566,15 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public [cluster writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "PhysicalContactUnoccupiedToOccupiedThreshold" - " write Error", - error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "PhysicalContactUnoccupiedToOccupiedTh" + "reshold write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -64672,7 +64639,7 @@ class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing GeneratedCommandList read Error", error); @@ -64738,7 +64705,7 @@ class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing AcceptedCommandList read Error", error); @@ -64804,7 +64771,7 @@ class ReadOccupancySensingAttributeList : public ReadAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AttributeList response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing AttributeList read Error", error); @@ -64870,7 +64837,7 @@ class ReadOccupancySensingFeatureMap : public ReadAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing FeatureMap read Error", error); @@ -64936,7 +64903,7 @@ class ReadOccupancySensingClusterRevision : public ReadAttribute { MTRBaseClusterOccupancySensing * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("OccupancySensing ClusterRevision read Error", error); @@ -65018,7 +64985,7 @@ class ReadWakeOnLanMACAddress : public ReadAttribute { MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMACAddressWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.MACAddress response %@", [value description]); if (error != nil) { LogNSError("WakeOnLan MACAddress read Error", error); @@ -65084,7 +65051,7 @@ class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("WakeOnLan GeneratedCommandList read Error", error); @@ -65150,7 +65117,7 @@ class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("WakeOnLan AcceptedCommandList read Error", error); @@ -65216,7 +65183,7 @@ class ReadWakeOnLanAttributeList : public ReadAttribute { MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.AttributeList response %@", [value description]); if (error != nil) { LogNSError("WakeOnLan AttributeList read Error", error); @@ -65282,7 +65249,7 @@ class ReadWakeOnLanFeatureMap : public ReadAttribute { MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("WakeOnLan FeatureMap read Error", error); @@ -65348,7 +65315,7 @@ class ReadWakeOnLanClusterRevision : public ReadAttribute { MTRBaseClusterWakeOnLan * cluster = [[MTRBaseClusterWakeOnLan alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLan.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("WakeOnLan ClusterRevision read Error", error); @@ -65445,18 +65412,18 @@ class ChannelChangeChannel : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeChannelWithParams:params - completionHandler:^( - MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -65495,16 +65462,16 @@ class ChannelChangeChannelByNumber : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeChannelByNumberWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -65541,16 +65508,16 @@ class ChannelSkipChannel : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster skipChannelWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -65579,7 +65546,7 @@ class ReadChannelChannelList : public ReadAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ChannelList response %@", [value description]); if (error != nil) { LogNSError("Channel ChannelList read Error", error); @@ -65645,14 +65612,13 @@ class ReadChannelLineup : public ReadAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeLineupWithCompletionHandler:^(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.Lineup response %@", [value description]); - if (error != nil) { - LogNSError("Channel Lineup read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.Lineup response %@", [value description]); + if (error != nil) { + LogNSError("Channel Lineup read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -65712,14 +65678,14 @@ class ReadChannelCurrentChannel : public ReadAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.CurrentChannel response %@", [value description]); - if (error != nil) { - LogNSError("Channel CurrentChannel read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeCurrentChannelWithCompletion:^(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.CurrentChannel response %@", [value description]); + if (error != nil) { + LogNSError("Channel CurrentChannel read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -65779,7 +65745,7 @@ class ReadChannelGeneratedCommandList : public ReadAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("Channel GeneratedCommandList read Error", error); @@ -65845,7 +65811,7 @@ class ReadChannelAcceptedCommandList : public ReadAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("Channel AcceptedCommandList read Error", error); @@ -65911,7 +65877,7 @@ class ReadChannelAttributeList : public ReadAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AttributeList response %@", [value description]); if (error != nil) { LogNSError("Channel AttributeList read Error", error); @@ -65977,7 +65943,7 @@ class ReadChannelFeatureMap : public ReadAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("Channel FeatureMap read Error", error); @@ -66043,7 +66009,7 @@ class ReadChannelClusterRevision : public ReadAttribute { MTRBaseClusterChannel * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("Channel ClusterRevision read Error", error); @@ -66143,18 +66109,18 @@ class TargetNavigatorNavigateTarget : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster navigateTargetWithParams:params - completionHandler:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -66183,7 +66149,7 @@ class ReadTargetNavigatorTargetList : public ReadAttribute { MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.TargetList response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator TargetList read Error", error); @@ -66249,7 +66215,7 @@ class ReadTargetNavigatorCurrentTarget : public ReadAttribute { MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator CurrentTarget read Error", error); @@ -66315,7 +66281,7 @@ class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator GeneratedCommandList read Error", error); @@ -66381,7 +66347,7 @@ class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator AcceptedCommandList read Error", error); @@ -66447,7 +66413,7 @@ class ReadTargetNavigatorAttributeList : public ReadAttribute { MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AttributeList response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator AttributeList read Error", error); @@ -66513,7 +66479,7 @@ class ReadTargetNavigatorFeatureMap : public ReadAttribute { MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator FeatureMap read Error", error); @@ -66579,7 +66545,7 @@ class ReadTargetNavigatorClusterRevision : public ReadAttribute { MTRBaseClusterTargetNavigator * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("TargetNavigator ClusterRevision read Error", error); @@ -66684,17 +66650,17 @@ class MediaPlaybackPlay : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster playWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -66728,18 +66694,18 @@ class MediaPlaybackPause : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster - pauseWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + pauseWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -66773,18 +66739,18 @@ class MediaPlaybackStopPlayback : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopPlaybackWithParams:params - completionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -66819,17 +66785,17 @@ class MediaPlaybackStartOver : public ClusterCommand { while (repeatCount--) { [cluster startOverWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -66864,17 +66830,17 @@ class MediaPlaybackPrevious : public ClusterCommand { while (repeatCount--) { [cluster previousWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -66908,17 +66874,17 @@ class MediaPlaybackNext : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster nextWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -66952,18 +66918,18 @@ class MediaPlaybackRewind : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster - rewindWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + rewindWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -66997,18 +66963,18 @@ class MediaPlaybackFastForward : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster fastForwardWithParams:params - completionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -67044,18 +67010,18 @@ class MediaPlaybackSkipForward : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster skipForwardWithParams:params - completionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -67092,18 +67058,18 @@ class MediaPlaybackSkipBackward : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster skipBackwardWithParams:params - completionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -67140,17 +67106,17 @@ class MediaPlaybackSeek : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster seekWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -67179,7 +67145,7 @@ class ReadMediaPlaybackCurrentState : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.CurrentState response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback CurrentState read Error", error); @@ -67245,7 +67211,7 @@ class ReadMediaPlaybackStartTime : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.StartTime response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback StartTime read Error", error); @@ -67311,7 +67277,7 @@ class ReadMediaPlaybackDuration : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDurationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.Duration response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback Duration read Error", error); @@ -67377,7 +67343,7 @@ class ReadMediaPlaybackSampledPosition : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSampledPositionWithCompletionHandler:^( + [cluster readAttributeSampledPositionWithCompletion:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); if (error != nil) { @@ -67444,7 +67410,7 @@ class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback PlaybackSpeed read Error", error); @@ -67510,7 +67476,7 @@ class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSeekRangeEndWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback SeekRangeEnd read Error", error); @@ -67576,7 +67542,7 @@ class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSeekRangeStartWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback SeekRangeStart read Error", error); @@ -67642,7 +67608,7 @@ class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback GeneratedCommandList read Error", error); @@ -67708,7 +67674,7 @@ class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback AcceptedCommandList read Error", error); @@ -67774,7 +67740,7 @@ class ReadMediaPlaybackAttributeList : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AttributeList response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback AttributeList read Error", error); @@ -67840,7 +67806,7 @@ class ReadMediaPlaybackFeatureMap : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback FeatureMap read Error", error); @@ -67906,7 +67872,7 @@ class ReadMediaPlaybackClusterRevision : public ReadAttribute { MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("MediaPlayback ClusterRevision read Error", error); @@ -68001,16 +67967,16 @@ class MediaInputSelectInput : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster selectInputWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68045,16 +68011,16 @@ class MediaInputShowInputStatus : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster showInputStatusWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68088,16 +68054,16 @@ class MediaInputHideInputStatus : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster hideInputStatusWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68137,16 +68103,16 @@ class MediaInputRenameInput : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster renameInputWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68175,7 +68141,7 @@ class ReadMediaInputInputList : public ReadAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.InputList response %@", [value description]); if (error != nil) { LogNSError("MediaInput InputList read Error", error); @@ -68241,7 +68207,7 @@ class ReadMediaInputCurrentInput : public ReadAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.CurrentInput response %@", [value description]); if (error != nil) { LogNSError("MediaInput CurrentInput read Error", error); @@ -68307,7 +68273,7 @@ class ReadMediaInputGeneratedCommandList : public ReadAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("MediaInput GeneratedCommandList read Error", error); @@ -68373,7 +68339,7 @@ class ReadMediaInputAcceptedCommandList : public ReadAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("MediaInput AcceptedCommandList read Error", error); @@ -68439,7 +68405,7 @@ class ReadMediaInputAttributeList : public ReadAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AttributeList response %@", [value description]); if (error != nil) { LogNSError("MediaInput AttributeList read Error", error); @@ -68505,7 +68471,7 @@ class ReadMediaInputFeatureMap : public ReadAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("MediaInput FeatureMap read Error", error); @@ -68571,7 +68537,7 @@ class ReadMediaInputClusterRevision : public ReadAttribute { MTRBaseClusterMediaInput * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("MediaInput ClusterRevision read Error", error); @@ -68659,16 +68625,16 @@ class LowPowerSleep : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster sleepWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -68696,7 +68662,7 @@ class ReadLowPowerGeneratedCommandList : public ReadAttribute { MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("LowPower GeneratedCommandList read Error", error); @@ -68762,7 +68728,7 @@ class ReadLowPowerAcceptedCommandList : public ReadAttribute { MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("LowPower AcceptedCommandList read Error", error); @@ -68828,7 +68794,7 @@ class ReadLowPowerAttributeList : public ReadAttribute { MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AttributeList response %@", [value description]); if (error != nil) { LogNSError("LowPower AttributeList read Error", error); @@ -68894,7 +68860,7 @@ class ReadLowPowerFeatureMap : public ReadAttribute { MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("LowPower FeatureMap read Error", error); @@ -68960,7 +68926,7 @@ class ReadLowPowerClusterRevision : public ReadAttribute { MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("LowPower ClusterRevision read Error", error); @@ -69050,17 +69016,17 @@ class KeypadInputSendKey : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -69089,7 +69055,7 @@ class ReadKeypadInputGeneratedCommandList : public ReadAttribute { MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("KeypadInput GeneratedCommandList read Error", error); @@ -69155,7 +69121,7 @@ class ReadKeypadInputAcceptedCommandList : public ReadAttribute { MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("KeypadInput AcceptedCommandList read Error", error); @@ -69221,7 +69187,7 @@ class ReadKeypadInputAttributeList : public ReadAttribute { MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AttributeList response %@", [value description]); if (error != nil) { LogNSError("KeypadInput AttributeList read Error", error); @@ -69287,7 +69253,7 @@ class ReadKeypadInputFeatureMap : public ReadAttribute { MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("KeypadInput FeatureMap read Error", error); @@ -69353,7 +69319,7 @@ class ReadKeypadInputClusterRevision : public ReadAttribute { MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("KeypadInput ClusterRevision read Error", error); @@ -69489,18 +69455,18 @@ class ContentLauncherLaunchContent : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster launchContentWithParams:params - completionHandler:^( - MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -69725,17 +69691,17 @@ class ContentLauncherLaunchURL : public ClusterCommand { while (repeatCount--) { [cluster launchURLWithParams:params - completionHandler:^(MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -69766,7 +69732,7 @@ class ReadContentLauncherAcceptHeader : public ReadAttribute { MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptHeaderWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher AcceptHeader read Error", error); @@ -69832,14 +69798,13 @@ class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeSupportedStreamingProtocolsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); - if (error != nil) { - LogNSError("ContentLauncher SupportedStreamingProtocols read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); + if (error != nil) { + LogNSError("ContentLauncher SupportedStreamingProtocols read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -69872,12 +69837,13 @@ class WriteContentLauncherSupportedStreamingProtocols : public WriteAttribute { [cluster writeAttributeSupportedStreamingProtocolsWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ContentLauncher SupportedStreamingProtocols write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ContentLauncher SupportedStreamingProtocols write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -69940,7 +69906,7 @@ class ReadContentLauncherGeneratedCommandList : public ReadAttribute { MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher GeneratedCommandList read Error", error); @@ -70006,7 +69972,7 @@ class ReadContentLauncherAcceptedCommandList : public ReadAttribute { MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher AcceptedCommandList read Error", error); @@ -70072,7 +70038,7 @@ class ReadContentLauncherAttributeList : public ReadAttribute { MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher AttributeList read Error", error); @@ -70138,7 +70104,7 @@ class ReadContentLauncherFeatureMap : public ReadAttribute { MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher FeatureMap read Error", error); @@ -70204,7 +70170,7 @@ class ReadContentLauncherClusterRevision : public ReadAttribute { MTRBaseClusterContentLauncher * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ContentLauncher ClusterRevision read Error", error); @@ -70297,16 +70263,16 @@ class AudioOutputSelectOutput : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster selectOutputWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -70347,16 +70313,16 @@ class AudioOutputRenameOutput : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster renameOutputWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -70385,7 +70351,7 @@ class ReadAudioOutputOutputList : public ReadAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.OutputList response %@", [value description]); if (error != nil) { LogNSError("AudioOutput OutputList read Error", error); @@ -70451,7 +70417,7 @@ class ReadAudioOutputCurrentOutput : public ReadAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentOutputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); if (error != nil) { LogNSError("AudioOutput CurrentOutput read Error", error); @@ -70517,7 +70483,7 @@ class ReadAudioOutputGeneratedCommandList : public ReadAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("AudioOutput GeneratedCommandList read Error", error); @@ -70583,7 +70549,7 @@ class ReadAudioOutputAcceptedCommandList : public ReadAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("AudioOutput AcceptedCommandList read Error", error); @@ -70649,7 +70615,7 @@ class ReadAudioOutputAttributeList : public ReadAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AttributeList response %@", [value description]); if (error != nil) { LogNSError("AudioOutput AttributeList read Error", error); @@ -70715,7 +70681,7 @@ class ReadAudioOutputFeatureMap : public ReadAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("AudioOutput FeatureMap read Error", error); @@ -70781,7 +70747,7 @@ class ReadAudioOutputClusterRevision : public ReadAttribute { MTRBaseClusterAudioOutput * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("AudioOutput ClusterRevision read Error", error); @@ -70886,18 +70852,18 @@ class ApplicationLauncherLaunchApp : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster launchAppWithParams:params - completionHandler:^( - MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -70940,18 +70906,18 @@ class ApplicationLauncherStopApp : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stopAppWithParams:params - completionHandler:^( - MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -70994,18 +70960,18 @@ class ApplicationLauncherHideApp : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster hideAppWithParams:params - completionHandler:^( - MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -71035,7 +71001,7 @@ class ReadApplicationLauncherCatalogList : public ReadAttribute { MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCatalogListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher CatalogList read Error", error); @@ -71101,7 +71067,7 @@ class ReadApplicationLauncherCurrentApp : public ReadAttribute { MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentAppWithCompletionHandler:^( + [cluster readAttributeCurrentAppWithCompletion:^( MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); if (error != nil) { @@ -71156,12 +71122,12 @@ class WriteApplicationLauncherCurrentApp : public WriteAttribute { [cluster writeAttributeCurrentAppWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ApplicationLauncher CurrentApp write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ApplicationLauncher CurrentApp write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -71226,7 +71192,7 @@ class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher GeneratedCommandList read Error", error); @@ -71292,7 +71258,7 @@ class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher AcceptedCommandList read Error", error); @@ -71358,7 +71324,7 @@ class ReadApplicationLauncherAttributeList : public ReadAttribute { MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher AttributeList read Error", error); @@ -71424,7 +71390,7 @@ class ReadApplicationLauncherFeatureMap : public ReadAttribute { MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher FeatureMap read Error", error); @@ -71490,7 +71456,7 @@ class ReadApplicationLauncherClusterRevision : public ReadAttribute { MTRBaseClusterApplicationLauncher * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ApplicationLauncher ClusterRevision read Error", error); @@ -71579,7 +71545,7 @@ class ReadApplicationBasicVendorName : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorName response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic VendorName read Error", error); @@ -71645,7 +71611,7 @@ class ReadApplicationBasicVendorID : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorID response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic VendorID read Error", error); @@ -71711,7 +71677,7 @@ class ReadApplicationBasicApplicationName : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApplicationNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic ApplicationName read Error", error); @@ -71777,7 +71743,7 @@ class ReadApplicationBasicProductID : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ProductID response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic ProductID read Error", error); @@ -71843,7 +71809,7 @@ class ReadApplicationBasicApplication : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApplicationWithCompletionHandler:^( + [cluster readAttributeApplicationWithCompletion:^( MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Application response %@", [value description]); if (error != nil) { @@ -71910,7 +71876,7 @@ class ReadApplicationBasicStatus : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Status response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic Status read Error", error); @@ -71976,7 +71942,7 @@ class ReadApplicationBasicApplicationVersion : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApplicationVersionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic ApplicationVersion read Error", error); @@ -72042,7 +72008,7 @@ class ReadApplicationBasicAllowedVendorList : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAllowedVendorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic AllowedVendorList read Error", error); @@ -72108,7 +72074,7 @@ class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic GeneratedCommandList read Error", error); @@ -72174,7 +72140,7 @@ class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic AcceptedCommandList read Error", error); @@ -72240,7 +72206,7 @@ class ReadApplicationBasicAttributeList : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic AttributeList read Error", error); @@ -72306,7 +72272,7 @@ class ReadApplicationBasicFeatureMap : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic FeatureMap read Error", error); @@ -72372,7 +72338,7 @@ class ReadApplicationBasicClusterRevision : public ReadAttribute { MTRBaseClusterApplicationBasic * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ApplicationBasic ClusterRevision read Error", error); @@ -72466,18 +72432,18 @@ class AccountLoginGetSetupPIN : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getSetupPINWithParams:params - completionHandler:^( - MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -72520,16 +72486,16 @@ class AccountLoginLogin : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster loginWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -72564,16 +72530,16 @@ class AccountLoginLogout : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster logoutWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -72601,7 +72567,7 @@ class ReadAccountLoginGeneratedCommandList : public ReadAttribute { MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("AccountLogin GeneratedCommandList read Error", error); @@ -72667,7 +72633,7 @@ class ReadAccountLoginAcceptedCommandList : public ReadAttribute { MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("AccountLogin AcceptedCommandList read Error", error); @@ -72733,7 +72699,7 @@ class ReadAccountLoginAttributeList : public ReadAttribute { MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AttributeList response %@", [value description]); if (error != nil) { LogNSError("AccountLogin AttributeList read Error", error); @@ -72799,7 +72765,7 @@ class ReadAccountLoginFeatureMap : public ReadAttribute { MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("AccountLogin FeatureMap read Error", error); @@ -72865,7 +72831,7 @@ class ReadAccountLoginClusterRevision : public ReadAttribute { MTRBaseClusterAccountLogin * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("AccountLogin ClusterRevision read Error", error); @@ -73082,16 +73048,16 @@ class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getProfileInfoCommandWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -73131,16 +73097,16 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster getMeasurementProfileCommandWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -73169,7 +73135,7 @@ class ReadElectricalMeasurementMeasurementType : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeMeasurementTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement MeasurementType read Error", error); @@ -73235,7 +73201,7 @@ class ReadElectricalMeasurementDcVoltage : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcVoltage read Error", error); @@ -73301,7 +73267,7 @@ class ReadElectricalMeasurementDcVoltageMin : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcVoltageMin read Error", error); @@ -73367,7 +73333,7 @@ class ReadElectricalMeasurementDcVoltageMax : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcVoltageMax read Error", error); @@ -73433,7 +73399,7 @@ class ReadElectricalMeasurementDcCurrent : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcCurrent read Error", error); @@ -73499,7 +73465,7 @@ class ReadElectricalMeasurementDcCurrentMin : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcCurrentMin read Error", error); @@ -73565,7 +73531,7 @@ class ReadElectricalMeasurementDcCurrentMax : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcCurrentMax read Error", error); @@ -73631,7 +73597,7 @@ class ReadElectricalMeasurementDcPower : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcPower read Error", error); @@ -73697,7 +73663,7 @@ class ReadElectricalMeasurementDcPowerMin : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcPowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcPowerMin read Error", error); @@ -73763,7 +73729,7 @@ class ReadElectricalMeasurementDcPowerMax : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcPowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcPowerMax read Error", error); @@ -73829,7 +73795,7 @@ class ReadElectricalMeasurementDcVoltageMultiplier : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcVoltageMultiplier read Error", error); @@ -73895,7 +73861,7 @@ class ReadElectricalMeasurementDcVoltageDivisor : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcVoltageDivisor read Error", error); @@ -73961,7 +73927,7 @@ class ReadElectricalMeasurementDcCurrentMultiplier : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcCurrentMultiplier read Error", error); @@ -74027,7 +73993,7 @@ class ReadElectricalMeasurementDcCurrentDivisor : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcCurrentDivisor read Error", error); @@ -74093,7 +74059,7 @@ class ReadElectricalMeasurementDcPowerMultiplier : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcPowerMultiplier read Error", error); @@ -74159,7 +74125,7 @@ class ReadElectricalMeasurementDcPowerDivisor : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeDcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement DcPowerDivisor read Error", error); @@ -74225,7 +74191,7 @@ class ReadElectricalMeasurementAcFrequency : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcFrequency read Error", error); @@ -74291,7 +74257,7 @@ class ReadElectricalMeasurementAcFrequencyMin : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcFrequencyMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcFrequencyMin read Error", error); @@ -74357,7 +74323,7 @@ class ReadElectricalMeasurementAcFrequencyMax : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcFrequencyMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcFrequencyMax read Error", error); @@ -74423,7 +74389,7 @@ class ReadElectricalMeasurementNeutralCurrent : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNeutralCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNeutralCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement NeutralCurrent read Error", error); @@ -74489,7 +74455,7 @@ class ReadElectricalMeasurementTotalActivePower : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalActivePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTotalActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement TotalActivePower read Error", error); @@ -74555,7 +74521,7 @@ class ReadElectricalMeasurementTotalReactivePower : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalReactivePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTotalReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement TotalReactivePower read Error", error); @@ -74621,7 +74587,7 @@ class ReadElectricalMeasurementTotalApparentPower : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalApparentPowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTotalApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement TotalApparentPower read Error", error); @@ -74687,14 +74653,13 @@ class ReadElectricalMeasurementMeasured1stHarmonicCurrent : public ReadAttribute MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement Measured1stHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeMeasured1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement Measured1stHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -74754,14 +74719,13 @@ class ReadElectricalMeasurementMeasured3rdHarmonicCurrent : public ReadAttribute MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement Measured3rdHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeMeasured3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement Measured3rdHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -74821,14 +74785,13 @@ class ReadElectricalMeasurementMeasured5thHarmonicCurrent : public ReadAttribute MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement Measured5thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeMeasured5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement Measured5thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -74888,14 +74851,13 @@ class ReadElectricalMeasurementMeasured7thHarmonicCurrent : public ReadAttribute MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement Measured7thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeMeasured7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement Measured7thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -74955,14 +74917,13 @@ class ReadElectricalMeasurementMeasured9thHarmonicCurrent : public ReadAttribute MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement Measured9thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeMeasured9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement Measured9thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -75022,14 +74983,13 @@ class ReadElectricalMeasurementMeasured11thHarmonicCurrent : public ReadAttribut MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement Measured11thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeMeasured11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement Measured11thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -75089,14 +75049,14 @@ class ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public ReadAttr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase1stHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase1stHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -75156,14 +75116,14 @@ class ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public ReadAttr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase3rdHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase3rdHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -75223,14 +75183,14 @@ class ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public ReadAttr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase5thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase5thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -75290,14 +75250,14 @@ class ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public ReadAttr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase7thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase7thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -75357,14 +75317,14 @@ class ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public ReadAttr MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase9thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase9thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -75424,14 +75384,14 @@ class ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public ReadAtt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase11thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase11thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -75491,7 +75451,7 @@ class ReadElectricalMeasurementAcFrequencyMultiplier : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcFrequencyMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcFrequencyMultiplier read Error", error); @@ -75557,7 +75517,7 @@ class ReadElectricalMeasurementAcFrequencyDivisor : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcFrequencyDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcFrequencyDivisor read Error", error); @@ -75623,7 +75583,7 @@ class ReadElectricalMeasurementPowerMultiplier : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement PowerMultiplier read Error", error); @@ -75689,7 +75649,7 @@ class ReadElectricalMeasurementPowerDivisor : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement PowerDivisor read Error", error); @@ -75755,14 +75715,13 @@ class ReadElectricalMeasurementHarmonicCurrentMultiplier : public ReadAttribute MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeHarmonicCurrentMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement HarmonicCurrentMultiplier read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement HarmonicCurrentMultiplier read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -75822,14 +75781,14 @@ class ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier : public ReadAttri MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement PhaseHarmonicCurrentMultiplier read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributePhaseHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement PhaseHarmonicCurrentMultiplier read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -75889,7 +75848,7 @@ class ReadElectricalMeasurementInstantaneousVoltage : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInstantaneousVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement InstantaneousVoltage read Error", error); @@ -75955,14 +75914,13 @@ class ReadElectricalMeasurementInstantaneousLineCurrent : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeInstantaneousLineCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement InstantaneousLineCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeInstantaneousLineCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement InstantaneousLineCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -76022,14 +75980,13 @@ class ReadElectricalMeasurementInstantaneousActiveCurrent : public ReadAttribute MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeInstantaneousActiveCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement InstantaneousActiveCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeInstantaneousActiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement InstantaneousActiveCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -76089,8 +76046,7 @@ class ReadElectricalMeasurementInstantaneousReactiveCurrent : public ReadAttribu MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousReactiveCurrentWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInstantaneousReactiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement InstantaneousReactiveCurrent read Error", error); @@ -76156,7 +76112,7 @@ class ReadElectricalMeasurementInstantaneousPower : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousPowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInstantaneousPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement InstantaneousPower read Error", error); @@ -76222,7 +76178,7 @@ class ReadElectricalMeasurementRmsVoltage : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltage read Error", error); @@ -76288,7 +76244,7 @@ class ReadElectricalMeasurementRmsVoltageMin : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMin read Error", error); @@ -76354,7 +76310,7 @@ class ReadElectricalMeasurementRmsVoltageMax : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMax read Error", error); @@ -76420,7 +76376,7 @@ class ReadElectricalMeasurementRmsCurrent : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrent read Error", error); @@ -76486,7 +76442,7 @@ class ReadElectricalMeasurementRmsCurrentMin : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMin read Error", error); @@ -76552,7 +76508,7 @@ class ReadElectricalMeasurementRmsCurrentMax : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMax read Error", error); @@ -76618,7 +76574,7 @@ class ReadElectricalMeasurementActivePower : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePower read Error", error); @@ -76684,7 +76640,7 @@ class ReadElectricalMeasurementActivePowerMin : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMinWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActivePowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMin read Error", error); @@ -76750,7 +76706,7 @@ class ReadElectricalMeasurementActivePowerMax : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMaxWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActivePowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMax read Error", error); @@ -76816,7 +76772,7 @@ class ReadElectricalMeasurementReactivePower : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactivePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ReactivePower read Error", error); @@ -76882,7 +76838,7 @@ class ReadElectricalMeasurementApparentPower : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApparentPowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ApparentPower read Error", error); @@ -76948,7 +76904,7 @@ class ReadElectricalMeasurementPowerFactor : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerFactorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePowerFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement PowerFactor read Error", error); @@ -77014,14 +76970,14 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public ReadA MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriod read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriod read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -77053,14 +77009,14 @@ class WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public Writ [cluster writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement " - "AverageRmsVoltageMeasurementPeriod write Error", - error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement " + "AverageRmsVoltageMeasurementPeriod write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77123,8 +77079,7 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounter : public ReadAttrib MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAverageRmsUnderVoltageCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounter read Error", error); @@ -77163,13 +77118,14 @@ class WriteElectricalMeasurementAverageRmsUnderVoltageCounter : public WriteAttr [cluster writeAttributeAverageRmsUnderVoltageCounterWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounter write Error", - error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ElectricalMeasurement AverageRmsUnderVoltageCounter write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77232,14 +77188,13 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriod : public ReadAttribut MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriod read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeRmsExtremeOverVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriod read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -77272,13 +77227,14 @@ class WriteElectricalMeasurementRmsExtremeOverVoltagePeriod : public WriteAttrib [cluster writeAttributeRmsExtremeOverVoltagePeriodWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ElectricalMeasurement RmsExtremeOverVoltagePeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ElectricalMeasurement RmsExtremeOverVoltagePeriod write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77341,8 +77297,7 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod : public ReadAttribu MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriod read Error", error); @@ -77381,13 +77336,14 @@ class WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod : public WriteAttri [cluster writeAttributeRmsExtremeUnderVoltagePeriodWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ElectricalMeasurement RmsExtremeUnderVoltagePeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ElectricalMeasurement RmsExtremeUnderVoltagePeriod write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77450,7 +77406,7 @@ class ReadElectricalMeasurementRmsVoltageSagPeriod : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagPeriodWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltageSagPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSagPeriod read Error", error); @@ -77488,12 +77444,12 @@ class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute { [cluster writeAttributeRmsVoltageSagPeriodWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement RmsVoltageSagPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77556,7 +77512,7 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriod : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellPeriodWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltageSwellPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod read Error", error); @@ -77592,14 +77548,15 @@ class WriteElectricalMeasurementRmsVoltageSwellPeriod : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeRmsVoltageSwellPeriodWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeRmsVoltageSwellPeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -77662,7 +77619,7 @@ class ReadElectricalMeasurementAcVoltageMultiplier : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcVoltageMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcVoltageMultiplier read Error", error); @@ -77728,7 +77685,7 @@ class ReadElectricalMeasurementAcVoltageDivisor : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcVoltageDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcVoltageDivisor read Error", error); @@ -77794,7 +77751,7 @@ class ReadElectricalMeasurementAcCurrentMultiplier : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcCurrentMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcCurrentMultiplier read Error", error); @@ -77860,7 +77817,7 @@ class ReadElectricalMeasurementAcCurrentDivisor : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcCurrentDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcCurrentDivisor read Error", error); @@ -77926,7 +77883,7 @@ class ReadElectricalMeasurementAcPowerMultiplier : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcPowerMultiplierWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcPowerMultiplier read Error", error); @@ -77992,7 +77949,7 @@ class ReadElectricalMeasurementAcPowerDivisor : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcPowerDivisorWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcPowerDivisor read Error", error); @@ -78058,7 +78015,7 @@ class ReadElectricalMeasurementOverloadAlarmsMask : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverloadAlarmsMaskWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement OverloadAlarmsMask read Error", error); @@ -78096,12 +78053,12 @@ class WriteElectricalMeasurementOverloadAlarmsMask : public WriteAttribute { [cluster writeAttributeOverloadAlarmsMaskWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement OverloadAlarmsMask write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement OverloadAlarmsMask write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -78164,7 +78121,7 @@ class ReadElectricalMeasurementVoltageOverload : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVoltageOverloadWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement VoltageOverload read Error", error); @@ -78230,7 +78187,7 @@ class ReadElectricalMeasurementCurrentOverload : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentOverloadWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement CurrentOverload read Error", error); @@ -78296,7 +78253,7 @@ class ReadElectricalMeasurementAcOverloadAlarmsMask : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcOverloadAlarmsMaskWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcOverloadAlarmsMask read Error", error); @@ -78332,14 +78289,15 @@ class WriteElectricalMeasurementAcOverloadAlarmsMask : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeAcOverloadAlarmsMaskWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement AcOverloadAlarmsMask write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeAcOverloadAlarmsMaskWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement AcOverloadAlarmsMask write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -78402,7 +78360,7 @@ class ReadElectricalMeasurementAcVoltageOverload : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcVoltageOverloadWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcVoltageOverload read Error", error); @@ -78468,7 +78426,7 @@ class ReadElectricalMeasurementAcCurrentOverload : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcCurrentOverloadWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcCurrentOverload read Error", error); @@ -78534,7 +78492,7 @@ class ReadElectricalMeasurementAcActivePowerOverload : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcActivePowerOverloadWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcActivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcActivePowerOverload read Error", error); @@ -78600,14 +78558,13 @@ class ReadElectricalMeasurementAcReactivePowerOverload : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeAcReactivePowerOverloadWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement AcReactivePowerOverload read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeAcReactivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement AcReactivePowerOverload read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -78667,7 +78624,7 @@ class ReadElectricalMeasurementAverageRmsOverVoltage : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsOverVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAverageRmsOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AverageRmsOverVoltage read Error", error); @@ -78733,7 +78690,7 @@ class ReadElectricalMeasurementAverageRmsUnderVoltage : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAverageRmsUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AverageRmsUnderVoltage read Error", error); @@ -78799,7 +78756,7 @@ class ReadElectricalMeasurementRmsExtremeOverVoltage : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeOverVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsExtremeOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsExtremeOverVoltage read Error", error); @@ -78865,7 +78822,7 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltage : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsExtremeUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltage read Error", error); @@ -78931,7 +78888,7 @@ class ReadElectricalMeasurementRmsVoltageSag : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltageSagWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSag read Error", error); @@ -78997,7 +78954,7 @@ class ReadElectricalMeasurementRmsVoltageSwell : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltageSwellWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSwell read Error", error); @@ -79063,7 +79020,7 @@ class ReadElectricalMeasurementLineCurrentPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLineCurrentPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLineCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement LineCurrentPhaseB read Error", error); @@ -79129,7 +79086,7 @@ class ReadElectricalMeasurementActiveCurrentPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveCurrentPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActiveCurrentPhaseB read Error", error); @@ -79195,7 +79152,7 @@ class ReadElectricalMeasurementReactiveCurrentPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactiveCurrentPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeReactiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ReactiveCurrentPhaseB read Error", error); @@ -79261,7 +79218,7 @@ class ReadElectricalMeasurementRmsVoltagePhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltagePhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltagePhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltagePhaseB read Error", error); @@ -79327,7 +79284,7 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltageMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMinPhaseB read Error", error); @@ -79393,7 +79350,7 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltageMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseB read Error", error); @@ -79459,7 +79416,7 @@ class ReadElectricalMeasurementRmsCurrentPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentPhaseB read Error", error); @@ -79525,7 +79482,7 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsCurrentMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMinPhaseB read Error", error); @@ -79591,7 +79548,7 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsCurrentMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseB read Error", error); @@ -79657,7 +79614,7 @@ class ReadElectricalMeasurementActivePowerPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerPhaseB read Error", error); @@ -79723,7 +79680,7 @@ class ReadElectricalMeasurementActivePowerMinPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMinPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActivePowerMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMinPhaseB read Error", error); @@ -79789,7 +79746,7 @@ class ReadElectricalMeasurementActivePowerMaxPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMaxPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActivePowerMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMaxPhaseB read Error", error); @@ -79855,7 +79812,7 @@ class ReadElectricalMeasurementReactivePowerPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactivePowerPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeReactivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ReactivePowerPhaseB read Error", error); @@ -79921,7 +79878,7 @@ class ReadElectricalMeasurementApparentPowerPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApparentPowerPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeApparentPowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ApparentPowerPhaseB read Error", error); @@ -79987,7 +79944,7 @@ class ReadElectricalMeasurementPowerFactorPhaseB : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerFactorPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePowerFactorPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement PowerFactorPhaseB read Error", error); @@ -80053,7 +80010,7 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:^( + [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); if (error != nil) { @@ -80121,14 +80078,14 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public ReadA MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseB read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseB read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -80188,7 +80145,7 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public Read MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:^( + [cluster readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); if (error != nil) { @@ -80255,14 +80212,14 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public ReadAt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseB read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseB read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -80322,14 +80279,14 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public ReadA MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseB read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseB read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -80389,14 +80346,13 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB : public ReadAttribute MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseB read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseB read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -80456,14 +80412,13 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public ReadAttribut MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseB read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseB read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -80523,7 +80478,7 @@ class ReadElectricalMeasurementLineCurrentPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLineCurrentPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLineCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement LineCurrentPhaseC read Error", error); @@ -80589,7 +80544,7 @@ class ReadElectricalMeasurementActiveCurrentPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveCurrentPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActiveCurrentPhaseC read Error", error); @@ -80655,7 +80610,7 @@ class ReadElectricalMeasurementReactiveCurrentPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactiveCurrentPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeReactiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ReactiveCurrentPhaseC read Error", error); @@ -80721,7 +80676,7 @@ class ReadElectricalMeasurementRmsVoltagePhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltagePhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltagePhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltagePhaseC read Error", error); @@ -80787,7 +80742,7 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltageMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMinPhaseC read Error", error); @@ -80853,7 +80808,7 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsVoltageMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseC read Error", error); @@ -80919,7 +80874,7 @@ class ReadElectricalMeasurementRmsCurrentPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentPhaseC read Error", error); @@ -80985,7 +80940,7 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsCurrentMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMinPhaseC read Error", error); @@ -81051,7 +81006,7 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRmsCurrentMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseC read Error", error); @@ -81117,7 +81072,7 @@ class ReadElectricalMeasurementActivePowerPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerPhaseC read Error", error); @@ -81183,7 +81138,7 @@ class ReadElectricalMeasurementActivePowerMinPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMinPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActivePowerMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMinPhaseC read Error", error); @@ -81249,7 +81204,7 @@ class ReadElectricalMeasurementActivePowerMaxPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMaxPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeActivePowerMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ActivePowerMaxPhaseC read Error", error); @@ -81315,7 +81270,7 @@ class ReadElectricalMeasurementReactivePowerPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactivePowerPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeReactivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ReactivePowerPhaseC read Error", error); @@ -81381,7 +81336,7 @@ class ReadElectricalMeasurementApparentPowerPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApparentPowerPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeApparentPowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ApparentPowerPhaseC read Error", error); @@ -81447,7 +81402,7 @@ class ReadElectricalMeasurementPowerFactorPhaseC : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerFactorPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributePowerFactorPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement PowerFactorPhaseC read Error", error); @@ -81513,7 +81468,7 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:^( + [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); if (error != nil) { @@ -81581,14 +81536,14 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public ReadA MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseC read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -81648,7 +81603,7 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public Read MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:^( + [cluster readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); if (error != nil) { @@ -81715,14 +81670,14 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public ReadAt MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseC read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -81782,14 +81737,14 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public ReadA MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseC read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -81849,14 +81804,13 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC : public ReadAttribute MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseC read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -81916,14 +81870,13 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public ReadAttribut MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseC read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -81983,7 +81936,7 @@ class ReadElectricalMeasurementGeneratedCommandList : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement GeneratedCommandList read Error", error); @@ -82049,7 +82002,7 @@ class ReadElectricalMeasurementAcceptedCommandList : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AcceptedCommandList read Error", error); @@ -82115,7 +82068,7 @@ class ReadElectricalMeasurementAttributeList : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement AttributeList read Error", error); @@ -82181,7 +82134,7 @@ class ReadElectricalMeasurementFeatureMap : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement FeatureMap read Error", error); @@ -82247,7 +82200,7 @@ class ReadElectricalMeasurementClusterRevision : public ReadAttribute { MTRBaseClusterElectricalMeasurement * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("ElectricalMeasurement ClusterRevision read Error", error); @@ -82440,16 +82393,16 @@ class TestClusterTest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -82483,16 +82436,16 @@ class TestClusterTestNotHandled : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testNotHandledWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -82526,18 +82479,18 @@ class TestClusterTestSpecific : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testSpecificWithParams:params - completionHandler:^( - MTRTestClusterClusterTestSpecificResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterTestSpecificResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -82571,16 +82524,16 @@ class TestClusterTestUnknownCommand : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testUnknownCommandWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -82618,18 +82571,18 @@ class TestClusterTestAddArguments : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testAddArgumentsWithParams:params - completionHandler:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -82666,18 +82619,18 @@ class TestClusterTestSimpleArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testSimpleArgumentRequestWithParams:params - completionHandler:^(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -82828,20 +82781,21 @@ class TestClusterTestStructArrayArgumentRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testStructArrayArgumentRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testStructArrayArgumentRequestWithParams:params + completion:^( + MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -82895,18 +82849,18 @@ class TestClusterTestStructArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testStructArgumentRequestWithParams:params - completionHandler:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -82958,18 +82912,18 @@ class TestClusterTestNestedStructArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testNestedStructArgumentRequestWithParams:params - completionHandler:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83026,18 +82980,18 @@ class TestClusterTestListStructArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testListStructArgumentRequestWithParams:params - completionHandler:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83085,18 +83039,18 @@ class TestClusterTestListInt8UArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testListInt8UArgumentRequestWithParams:params - completionHandler:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83194,18 +83148,18 @@ class TestClusterTestNestedStructListArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testNestedStructListArgumentRequestWithParams:params - completionHandler:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83312,18 +83266,18 @@ class TestClusterTestListNestedStructListArgumentRequest : public ClusterCommand while (repeatCount--) { [cluster testListNestedStructListArgumentRequestWithParams:params - completionHandler:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83372,18 +83326,18 @@ class TestClusterTestListInt8UReverseRequest : public ClusterCommand { while (repeatCount--) { [cluster testListInt8UReverseRequestWithParams:params - completionHandler:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83423,18 +83377,18 @@ class TestClusterTestEnumsRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testEnumsRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterTestEnumsResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83480,18 +83434,18 @@ class TestClusterTestNullableOptionalRequest : public ClusterCommand { while (repeatCount--) { [cluster testNullableOptionalRequestWithParams:params - completionHandler:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83689,19 +83643,19 @@ class TestClusterTestComplexNullableOptionalRequest : public ClusterCommand { while (repeatCount--) { [cluster testComplexNullableOptionalRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83763,18 +83717,18 @@ class TestClusterSimpleStructEchoRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster simpleStructEchoRequestWithParams:params - completionHandler:^(MTRTestClusterClusterSimpleStructResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterSimpleStructResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83810,16 +83764,16 @@ class TestClusterTimedInvokeRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster timedInvokeRequestWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83859,16 +83813,16 @@ class TestClusterTestSimpleOptionalArgumentRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testSimpleOptionalArgumentRequestWithParams:params - completionHandler:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83909,18 +83863,18 @@ class TestClusterTestEmitTestEventRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster testEmitTestEventRequestWithParams:params - completionHandler:^(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83958,19 +83912,19 @@ class TestClusterTestEmitTestFabricScopedEventRequest : public ClusterCommand { while (repeatCount--) { [cluster testEmitTestFabricScopedEventRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + completion:^( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -83999,7 +83953,7 @@ class ReadTestClusterBoolean : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Boolean response %@", [value description]); if (error != nil) { LogNSError("TestCluster Boolean read Error", error); @@ -84037,12 +83991,12 @@ class WriteTestClusterBoolean : public WriteAttribute { [cluster writeAttributeBooleanWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Boolean write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Boolean write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84105,7 +84059,7 @@ class ReadTestClusterBitmap8 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap8 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Bitmap8 read Error", error); @@ -84143,12 +84097,12 @@ class WriteTestClusterBitmap8 : public WriteAttribute { [cluster writeAttributeBitmap8WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Bitmap8 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Bitmap8 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84211,7 +84165,7 @@ class ReadTestClusterBitmap16 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap16 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Bitmap16 read Error", error); @@ -84249,12 +84203,12 @@ class WriteTestClusterBitmap16 : public WriteAttribute { [cluster writeAttributeBitmap16WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Bitmap16 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Bitmap16 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84317,7 +84271,7 @@ class ReadTestClusterBitmap32 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap32 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Bitmap32 read Error", error); @@ -84355,12 +84309,12 @@ class WriteTestClusterBitmap32 : public WriteAttribute { [cluster writeAttributeBitmap32WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Bitmap32 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Bitmap32 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84423,7 +84377,7 @@ class ReadTestClusterBitmap64 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Bitmap64 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Bitmap64 read Error", error); @@ -84461,12 +84415,12 @@ class WriteTestClusterBitmap64 : public WriteAttribute { [cluster writeAttributeBitmap64WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Bitmap64 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Bitmap64 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84529,7 +84483,7 @@ class ReadTestClusterInt8u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int8u read Error", error); @@ -84567,12 +84521,12 @@ class WriteTestClusterInt8u : public WriteAttribute { [cluster writeAttributeInt8uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int8u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int8u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84635,7 +84589,7 @@ class ReadTestClusterInt16u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int16u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int16u read Error", error); @@ -84673,12 +84627,12 @@ class WriteTestClusterInt16u : public WriteAttribute { [cluster writeAttributeInt16uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int16u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int16u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84741,7 +84695,7 @@ class ReadTestClusterInt24u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt24uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt24uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int24u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int24u read Error", error); @@ -84779,12 +84733,12 @@ class WriteTestClusterInt24u : public WriteAttribute { [cluster writeAttributeInt24uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int24u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int24u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84847,7 +84801,7 @@ class ReadTestClusterInt32u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int32u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int32u read Error", error); @@ -84885,12 +84839,12 @@ class WriteTestClusterInt32u : public WriteAttribute { [cluster writeAttributeInt32uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int32u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int32u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -84953,7 +84907,7 @@ class ReadTestClusterInt40u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt40uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt40uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int40u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int40u read Error", error); @@ -84991,12 +84945,12 @@ class WriteTestClusterInt40u : public WriteAttribute { [cluster writeAttributeInt40uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int40u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int40u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85059,7 +85013,7 @@ class ReadTestClusterInt48u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt48uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt48uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int48u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int48u read Error", error); @@ -85097,12 +85051,12 @@ class WriteTestClusterInt48u : public WriteAttribute { [cluster writeAttributeInt48uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int48u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int48u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85165,7 +85119,7 @@ class ReadTestClusterInt56u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt56uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt56uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int56u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int56u read Error", error); @@ -85203,12 +85157,12 @@ class WriteTestClusterInt56u : public WriteAttribute { [cluster writeAttributeInt56uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int56u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int56u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85271,7 +85225,7 @@ class ReadTestClusterInt64u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int64u response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int64u read Error", error); @@ -85309,12 +85263,12 @@ class WriteTestClusterInt64u : public WriteAttribute { [cluster writeAttributeInt64uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int64u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int64u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85377,7 +85331,7 @@ class ReadTestClusterInt8s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int8s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int8s read Error", error); @@ -85415,12 +85369,12 @@ class WriteTestClusterInt8s : public WriteAttribute { [cluster writeAttributeInt8sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int8s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int8s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85483,7 +85437,7 @@ class ReadTestClusterInt16s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int16s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int16s read Error", error); @@ -85521,12 +85475,12 @@ class WriteTestClusterInt16s : public WriteAttribute { [cluster writeAttributeInt16sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int16s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int16s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85589,7 +85543,7 @@ class ReadTestClusterInt24s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt24sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt24sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int24s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int24s read Error", error); @@ -85627,12 +85581,12 @@ class WriteTestClusterInt24s : public WriteAttribute { [cluster writeAttributeInt24sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int24s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int24s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85695,7 +85649,7 @@ class ReadTestClusterInt32s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int32s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int32s read Error", error); @@ -85733,12 +85687,12 @@ class WriteTestClusterInt32s : public WriteAttribute { [cluster writeAttributeInt32sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int32s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int32s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85801,7 +85755,7 @@ class ReadTestClusterInt40s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt40sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt40sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int40s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int40s read Error", error); @@ -85839,12 +85793,12 @@ class WriteTestClusterInt40s : public WriteAttribute { [cluster writeAttributeInt40sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int40s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int40s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -85907,7 +85861,7 @@ class ReadTestClusterInt48s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt48sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt48sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int48s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int48s read Error", error); @@ -85945,12 +85899,12 @@ class WriteTestClusterInt48s : public WriteAttribute { [cluster writeAttributeInt48sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int48s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int48s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86013,7 +85967,7 @@ class ReadTestClusterInt56s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt56sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt56sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int56s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int56s read Error", error); @@ -86051,12 +86005,12 @@ class WriteTestClusterInt56s : public WriteAttribute { [cluster writeAttributeInt56sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int56s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int56s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86119,7 +86073,7 @@ class ReadTestClusterInt64s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Int64s response %@", [value description]); if (error != nil) { LogNSError("TestCluster Int64s read Error", error); @@ -86157,12 +86111,12 @@ class WriteTestClusterInt64s : public WriteAttribute { [cluster writeAttributeInt64sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Int64s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Int64s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86225,7 +86179,7 @@ class ReadTestClusterEnum8 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Enum8 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Enum8 read Error", error); @@ -86263,12 +86217,12 @@ class WriteTestClusterEnum8 : public WriteAttribute { [cluster writeAttributeEnum8WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Enum8 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Enum8 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86331,7 +86285,7 @@ class ReadTestClusterEnum16 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Enum16 response %@", [value description]); if (error != nil) { LogNSError("TestCluster Enum16 read Error", error); @@ -86369,12 +86323,12 @@ class WriteTestClusterEnum16 : public WriteAttribute { [cluster writeAttributeEnum16WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Enum16 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Enum16 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86437,7 +86391,7 @@ class ReadTestClusterFloatSingle : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.FloatSingle response %@", [value description]); if (error != nil) { LogNSError("TestCluster FloatSingle read Error", error); @@ -86475,12 +86429,12 @@ class WriteTestClusterFloatSingle : public WriteAttribute { [cluster writeAttributeFloatSingleWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster FloatSingle write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster FloatSingle write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86543,7 +86497,7 @@ class ReadTestClusterFloatDouble : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.FloatDouble response %@", [value description]); if (error != nil) { LogNSError("TestCluster FloatDouble read Error", error); @@ -86581,12 +86535,12 @@ class WriteTestClusterFloatDouble : public WriteAttribute { [cluster writeAttributeFloatDoubleWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster FloatDouble write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster FloatDouble write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86649,7 +86603,7 @@ class ReadTestClusterOctetString : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.OctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster OctetString read Error", error); @@ -86687,12 +86641,12 @@ class WriteTestClusterOctetString : public WriteAttribute { [cluster writeAttributeOctetStringWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster OctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster OctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86755,7 +86709,7 @@ class ReadTestClusterListInt8u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListInt8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster ListInt8u read Error", error); @@ -86803,12 +86757,12 @@ class WriteTestClusterListInt8u : public WriteAttribute { [cluster writeAttributeListInt8uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ListInt8u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ListInt8u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86872,7 +86826,7 @@ class ReadTestClusterListOctetString : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeListOctetStringWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeListOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListOctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster ListOctetString read Error", error); @@ -86920,12 +86874,12 @@ class WriteTestClusterListOctetString : public WriteAttribute { [cluster writeAttributeListOctetStringWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ListOctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ListOctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -86989,7 +86943,7 @@ class ReadTestClusterListStructOctetString : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeListStructOctetStringWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeListStructOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListStructOctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster ListStructOctetString read Error", error); @@ -87039,12 +86993,12 @@ class WriteTestClusterListStructOctetString : public WriteAttribute { [cluster writeAttributeListStructOctetStringWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ListStructOctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ListStructOctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87109,7 +87063,7 @@ class ReadTestClusterLongOctetString : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLongOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLongOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.LongOctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster LongOctetString read Error", error); @@ -87147,12 +87101,12 @@ class WriteTestClusterLongOctetString : public WriteAttribute { [cluster writeAttributeLongOctetStringWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster LongOctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster LongOctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87215,7 +87169,7 @@ class ReadTestClusterCharString : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.CharString response %@", [value description]); if (error != nil) { LogNSError("TestCluster CharString read Error", error); @@ -87255,12 +87209,12 @@ class WriteTestClusterCharString : public WriteAttribute { [cluster writeAttributeCharStringWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster CharString write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster CharString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87323,7 +87277,7 @@ class ReadTestClusterLongCharString : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLongCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeLongCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.LongCharString response %@", [value description]); if (error != nil) { LogNSError("TestCluster LongCharString read Error", error); @@ -87363,12 +87317,12 @@ class WriteTestClusterLongCharString : public WriteAttribute { [cluster writeAttributeLongCharStringWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster LongCharString write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster LongCharString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87431,7 +87385,7 @@ class ReadTestClusterEpochUs : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EpochUs response %@", [value description]); if (error != nil) { LogNSError("TestCluster EpochUs read Error", error); @@ -87469,12 +87423,12 @@ class WriteTestClusterEpochUs : public WriteAttribute { [cluster writeAttributeEpochUsWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster EpochUs write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster EpochUs write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87537,7 +87491,7 @@ class ReadTestClusterEpochS : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EpochS response %@", [value description]); if (error != nil) { LogNSError("TestCluster EpochS read Error", error); @@ -87575,12 +87529,12 @@ class WriteTestClusterEpochS : public WriteAttribute { [cluster writeAttributeEpochSWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster EpochS write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster EpochS write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87643,7 +87597,7 @@ class ReadTestClusterVendorId : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.VendorId response %@", [value description]); if (error != nil) { LogNSError("TestCluster VendorId read Error", error); @@ -87681,12 +87635,12 @@ class WriteTestClusterVendorId : public WriteAttribute { [cluster writeAttributeVendorIdWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster VendorId write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster VendorId write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -87749,14 +87703,14 @@ class ReadTestClusterListNullablesAndOptionalsStruct : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeListNullablesAndOptionalsStructWithCompletionHandler:^( - NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TestCluster.ListNullablesAndOptionalsStruct response %@", [value description]); - if (error != nil) { - LogNSError("TestCluster ListNullablesAndOptionalsStruct read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeListNullablesAndOptionalsStructWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TestCluster.ListNullablesAndOptionalsStruct response %@", [value description]); + if (error != nil) { + LogNSError("TestCluster ListNullablesAndOptionalsStruct read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -87949,13 +87903,14 @@ class WriteTestClusterListNullablesAndOptionalsStruct : public WriteAttribute { [cluster writeAttributeListNullablesAndOptionalsStructWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "TestCluster ListNullablesAndOptionalsStruct write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "TestCluster ListNullablesAndOptionalsStruct write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88021,7 +87976,7 @@ class ReadTestClusterEnumAttr : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.EnumAttr response %@", [value description]); if (error != nil) { LogNSError("TestCluster EnumAttr read Error", error); @@ -88059,12 +88014,12 @@ class WriteTestClusterEnumAttr : public WriteAttribute { [cluster writeAttributeEnumAttrWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster EnumAttr write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster EnumAttr write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88127,7 +88082,7 @@ class ReadTestClusterStructAttr : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStructAttrWithCompletionHandler:^( + [cluster readAttributeStructAttrWithCompletion:^( MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.StructAttr response %@", [value description]); if (error != nil) { @@ -88176,12 +88131,12 @@ class WriteTestClusterStructAttr : public WriteAttribute { [cluster writeAttributeStructAttrWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster StructAttr write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster StructAttr write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88245,7 +88200,7 @@ class ReadTestClusterRangeRestrictedInt8u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster RangeRestrictedInt8u read Error", error); @@ -88283,12 +88238,12 @@ class WriteTestClusterRangeRestrictedInt8u : public WriteAttribute { [cluster writeAttributeRangeRestrictedInt8uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster RangeRestrictedInt8u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster RangeRestrictedInt8u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88351,7 +88306,7 @@ class ReadTestClusterRangeRestrictedInt8s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt8s response %@", [value description]); if (error != nil) { LogNSError("TestCluster RangeRestrictedInt8s read Error", error); @@ -88389,12 +88344,12 @@ class WriteTestClusterRangeRestrictedInt8s : public WriteAttribute { [cluster writeAttributeRangeRestrictedInt8sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster RangeRestrictedInt8s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster RangeRestrictedInt8s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88457,7 +88412,7 @@ class ReadTestClusterRangeRestrictedInt16u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt16u response %@", [value description]); if (error != nil) { LogNSError("TestCluster RangeRestrictedInt16u read Error", error); @@ -88495,12 +88450,12 @@ class WriteTestClusterRangeRestrictedInt16u : public WriteAttribute { [cluster writeAttributeRangeRestrictedInt16uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster RangeRestrictedInt16u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster RangeRestrictedInt16u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88563,7 +88518,7 @@ class ReadTestClusterRangeRestrictedInt16s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.RangeRestrictedInt16s response %@", [value description]); if (error != nil) { LogNSError("TestCluster RangeRestrictedInt16s read Error", error); @@ -88601,12 +88556,12 @@ class WriteTestClusterRangeRestrictedInt16s : public WriteAttribute { [cluster writeAttributeRangeRestrictedInt16sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster RangeRestrictedInt16s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster RangeRestrictedInt16s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88669,7 +88624,7 @@ class ReadTestClusterListLongOctetString : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeListLongOctetStringWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeListLongOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ListLongOctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster ListLongOctetString read Error", error); @@ -88717,12 +88672,12 @@ class WriteTestClusterListLongOctetString : public WriteAttribute { [cluster writeAttributeListLongOctetStringWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ListLongOctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ListLongOctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88789,13 +88744,13 @@ class ReadTestClusterListFabricScoped : public ReadAttribute { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; [cluster readAttributeListFabricScopedWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TestCluster.ListFabricScoped response %@", [value description]); - if (error != nil) { - LogNSError("TestCluster ListFabricScoped read Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TestCluster.ListFabricScoped response %@", [value description]); + if (error != nil) { + LogNSError("TestCluster ListFabricScoped read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -88886,12 +88841,12 @@ class WriteTestClusterListFabricScoped : public WriteAttribute { [cluster writeAttributeListFabricScopedWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ListFabricScoped write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ListFabricScoped write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -88956,7 +88911,7 @@ class ReadTestClusterTimedWriteBoolean : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimedWriteBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeTimedWriteBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.TimedWriteBoolean response %@", [value description]); if (error != nil) { LogNSError("TestCluster TimedWriteBoolean read Error", error); @@ -88994,12 +88949,12 @@ class WriteTestClusterTimedWriteBoolean : public WriteAttribute { [cluster writeAttributeTimedWriteBooleanWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster TimedWriteBoolean write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster TimedWriteBoolean write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89062,7 +89017,7 @@ class ReadTestClusterGeneralErrorBoolean : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneralErrorBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneralErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.GeneralErrorBoolean response %@", [value description]); if (error != nil) { LogNSError("TestCluster GeneralErrorBoolean read Error", error); @@ -89100,12 +89055,12 @@ class WriteTestClusterGeneralErrorBoolean : public WriteAttribute { [cluster writeAttributeGeneralErrorBooleanWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster GeneralErrorBoolean write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster GeneralErrorBoolean write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89168,7 +89123,7 @@ class ReadTestClusterClusterErrorBoolean : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterErrorBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ClusterErrorBoolean response %@", [value description]); if (error != nil) { LogNSError("TestCluster ClusterErrorBoolean read Error", error); @@ -89206,12 +89161,12 @@ class WriteTestClusterClusterErrorBoolean : public WriteAttribute { [cluster writeAttributeClusterErrorBooleanWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster ClusterErrorBoolean write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster ClusterErrorBoolean write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89274,7 +89229,7 @@ class ReadTestClusterUnsupported : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnsupportedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeUnsupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.Unsupported response %@", [value description]); if (error != nil) { LogNSError("TestCluster Unsupported read Error", error); @@ -89312,12 +89267,12 @@ class WriteTestClusterUnsupported : public WriteAttribute { [cluster writeAttributeUnsupportedWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster Unsupported write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster Unsupported write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89380,7 +89335,7 @@ class ReadTestClusterNullableBoolean : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBoolean response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableBoolean read Error", error); @@ -89418,12 +89373,12 @@ class WriteTestClusterNullableBoolean : public WriteAttribute { [cluster writeAttributeNullableBooleanWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableBoolean write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableBoolean write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89486,7 +89441,7 @@ class ReadTestClusterNullableBitmap8 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap8 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableBitmap8 read Error", error); @@ -89524,12 +89479,12 @@ class WriteTestClusterNullableBitmap8 : public WriteAttribute { [cluster writeAttributeNullableBitmap8WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableBitmap8 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableBitmap8 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89592,7 +89547,7 @@ class ReadTestClusterNullableBitmap16 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap16 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableBitmap16 read Error", error); @@ -89630,12 +89585,12 @@ class WriteTestClusterNullableBitmap16 : public WriteAttribute { [cluster writeAttributeNullableBitmap16WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableBitmap16 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableBitmap16 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89698,7 +89653,7 @@ class ReadTestClusterNullableBitmap32 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap32 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableBitmap32 read Error", error); @@ -89736,12 +89691,12 @@ class WriteTestClusterNullableBitmap32 : public WriteAttribute { [cluster writeAttributeNullableBitmap32WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableBitmap32 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableBitmap32 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89804,7 +89759,7 @@ class ReadTestClusterNullableBitmap64 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableBitmap64 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableBitmap64 read Error", error); @@ -89842,12 +89797,12 @@ class WriteTestClusterNullableBitmap64 : public WriteAttribute { [cluster writeAttributeNullableBitmap64WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableBitmap64 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableBitmap64 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -89910,7 +89865,7 @@ class ReadTestClusterNullableInt8u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt8u read Error", error); @@ -89948,12 +89903,12 @@ class WriteTestClusterNullableInt8u : public WriteAttribute { [cluster writeAttributeNullableInt8uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt8u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt8u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90016,7 +89971,7 @@ class ReadTestClusterNullableInt16u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt16u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt16u read Error", error); @@ -90054,12 +90009,12 @@ class WriteTestClusterNullableInt16u : public WriteAttribute { [cluster writeAttributeNullableInt16uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt16u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt16u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90122,7 +90077,7 @@ class ReadTestClusterNullableInt24u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt24uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt24uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt24u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt24u read Error", error); @@ -90160,12 +90115,12 @@ class WriteTestClusterNullableInt24u : public WriteAttribute { [cluster writeAttributeNullableInt24uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt24u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt24u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90228,7 +90183,7 @@ class ReadTestClusterNullableInt32u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt32u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt32u read Error", error); @@ -90266,12 +90221,12 @@ class WriteTestClusterNullableInt32u : public WriteAttribute { [cluster writeAttributeNullableInt32uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt32u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt32u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90334,7 +90289,7 @@ class ReadTestClusterNullableInt40u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt40uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt40uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt40u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt40u read Error", error); @@ -90372,12 +90327,12 @@ class WriteTestClusterNullableInt40u : public WriteAttribute { [cluster writeAttributeNullableInt40uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt40u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt40u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90440,7 +90395,7 @@ class ReadTestClusterNullableInt48u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt48uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt48uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt48u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt48u read Error", error); @@ -90478,12 +90433,12 @@ class WriteTestClusterNullableInt48u : public WriteAttribute { [cluster writeAttributeNullableInt48uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt48u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt48u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90546,7 +90501,7 @@ class ReadTestClusterNullableInt56u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt56uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt56uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt56u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt56u read Error", error); @@ -90584,12 +90539,12 @@ class WriteTestClusterNullableInt56u : public WriteAttribute { [cluster writeAttributeNullableInt56uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt56u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt56u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90652,7 +90607,7 @@ class ReadTestClusterNullableInt64u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt64u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt64u read Error", error); @@ -90690,12 +90645,12 @@ class WriteTestClusterNullableInt64u : public WriteAttribute { [cluster writeAttributeNullableInt64uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt64u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt64u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90758,7 +90713,7 @@ class ReadTestClusterNullableInt8s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt8s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt8s read Error", error); @@ -90796,12 +90751,12 @@ class WriteTestClusterNullableInt8s : public WriteAttribute { [cluster writeAttributeNullableInt8sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt8s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt8s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90864,7 +90819,7 @@ class ReadTestClusterNullableInt16s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt16s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt16s read Error", error); @@ -90902,12 +90857,12 @@ class WriteTestClusterNullableInt16s : public WriteAttribute { [cluster writeAttributeNullableInt16sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt16s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt16s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -90970,7 +90925,7 @@ class ReadTestClusterNullableInt24s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt24sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt24sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt24s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt24s read Error", error); @@ -91008,12 +90963,12 @@ class WriteTestClusterNullableInt24s : public WriteAttribute { [cluster writeAttributeNullableInt24sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt24s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt24s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91076,7 +91031,7 @@ class ReadTestClusterNullableInt32s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt32s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt32s read Error", error); @@ -91114,12 +91069,12 @@ class WriteTestClusterNullableInt32s : public WriteAttribute { [cluster writeAttributeNullableInt32sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt32s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt32s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91182,7 +91137,7 @@ class ReadTestClusterNullableInt40s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt40sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt40sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt40s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt40s read Error", error); @@ -91220,12 +91175,12 @@ class WriteTestClusterNullableInt40s : public WriteAttribute { [cluster writeAttributeNullableInt40sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt40s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt40s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91288,7 +91243,7 @@ class ReadTestClusterNullableInt48s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt48sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt48sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt48s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt48s read Error", error); @@ -91326,12 +91281,12 @@ class WriteTestClusterNullableInt48s : public WriteAttribute { [cluster writeAttributeNullableInt48sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt48s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt48s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91394,7 +91349,7 @@ class ReadTestClusterNullableInt56s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt56sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt56sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt56s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt56s read Error", error); @@ -91432,12 +91387,12 @@ class WriteTestClusterNullableInt56s : public WriteAttribute { [cluster writeAttributeNullableInt56sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt56s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt56s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91500,7 +91455,7 @@ class ReadTestClusterNullableInt64s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableInt64s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableInt64s read Error", error); @@ -91538,12 +91493,12 @@ class WriteTestClusterNullableInt64s : public WriteAttribute { [cluster writeAttributeNullableInt64sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableInt64s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableInt64s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91606,7 +91561,7 @@ class ReadTestClusterNullableEnum8 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnum8 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableEnum8 read Error", error); @@ -91644,12 +91599,12 @@ class WriteTestClusterNullableEnum8 : public WriteAttribute { [cluster writeAttributeNullableEnum8WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableEnum8 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableEnum8 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91712,7 +91667,7 @@ class ReadTestClusterNullableEnum16 : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnum16 response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableEnum16 read Error", error); @@ -91750,12 +91705,12 @@ class WriteTestClusterNullableEnum16 : public WriteAttribute { [cluster writeAttributeNullableEnum16WithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableEnum16 write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableEnum16 write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91818,7 +91773,7 @@ class ReadTestClusterNullableFloatSingle : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableFloatSingle response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableFloatSingle read Error", error); @@ -91856,12 +91811,12 @@ class WriteTestClusterNullableFloatSingle : public WriteAttribute { [cluster writeAttributeNullableFloatSingleWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableFloatSingle write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableFloatSingle write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -91924,7 +91879,7 @@ class ReadTestClusterNullableFloatDouble : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableFloatDouble response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableFloatDouble read Error", error); @@ -91962,12 +91917,12 @@ class WriteTestClusterNullableFloatDouble : public WriteAttribute { [cluster writeAttributeNullableFloatDoubleWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableFloatDouble write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableFloatDouble write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92030,7 +91985,7 @@ class ReadTestClusterNullableOctetString : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableOctetString response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableOctetString read Error", error); @@ -92068,12 +92023,12 @@ class WriteTestClusterNullableOctetString : public WriteAttribute { [cluster writeAttributeNullableOctetStringWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableOctetString write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableOctetString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92136,7 +92091,7 @@ class ReadTestClusterNullableCharString : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableCharString response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableCharString read Error", error); @@ -92176,12 +92131,12 @@ class WriteTestClusterNullableCharString : public WriteAttribute { [cluster writeAttributeNullableCharStringWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableCharString write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableCharString write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92244,7 +92199,7 @@ class ReadTestClusterNullableEnumAttr : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableEnumAttr response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableEnumAttr read Error", error); @@ -92282,12 +92237,12 @@ class WriteTestClusterNullableEnumAttr : public WriteAttribute { [cluster writeAttributeNullableEnumAttrWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableEnumAttr write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableEnumAttr write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92350,7 +92305,7 @@ class ReadTestClusterNullableStruct : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableStructWithCompletionHandler:^( + [cluster readAttributeNullableStructWithCompletion:^( MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableStruct response %@", [value description]); if (error != nil) { @@ -92405,12 +92360,12 @@ class WriteTestClusterNullableStruct : public WriteAttribute { [cluster writeAttributeNullableStructWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableStruct write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableStruct write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92474,8 +92429,7 @@ class ReadTestClusterNullableRangeRestrictedInt8u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableRangeRestrictedInt8u read Error", error); @@ -92511,15 +92465,15 @@ class WriteTestClusterNullableRangeRestrictedInt8u : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributeNullableRangeRestrictedInt8uWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableRangeRestrictedInt8u write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableRangeRestrictedInt8u write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92582,8 +92536,7 @@ class ReadTestClusterNullableRangeRestrictedInt8s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt8s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableRangeRestrictedInt8s read Error", error); @@ -92619,15 +92572,15 @@ class WriteTestClusterNullableRangeRestrictedInt8s : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nullable value = [NSNumber numberWithChar:mValue]; - [cluster - writeAttributeNullableRangeRestrictedInt8sWithValue:value - params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableRangeRestrictedInt8s write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster NullableRangeRestrictedInt8s write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92690,8 +92643,7 @@ class ReadTestClusterNullableRangeRestrictedInt16u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt16u response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableRangeRestrictedInt16u read Error", error); @@ -92730,12 +92682,13 @@ class WriteTestClusterNullableRangeRestrictedInt16u : public WriteAttribute { [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableRangeRestrictedInt16u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "TestCluster NullableRangeRestrictedInt16u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92798,8 +92751,7 @@ class ReadTestClusterNullableRangeRestrictedInt16s : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.NullableRangeRestrictedInt16s response %@", [value description]); if (error != nil) { LogNSError("TestCluster NullableRangeRestrictedInt16s read Error", error); @@ -92838,12 +92790,13 @@ class WriteTestClusterNullableRangeRestrictedInt16s : public WriteAttribute { [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster NullableRangeRestrictedInt16s write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "TestCluster NullableRangeRestrictedInt16s write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -92906,7 +92859,7 @@ class ReadTestClusterWriteOnlyInt8u : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWriteOnlyInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeWriteOnlyInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.WriteOnlyInt8u response %@", [value description]); if (error != nil) { LogNSError("TestCluster WriteOnlyInt8u read Error", error); @@ -92944,12 +92897,12 @@ class WriteTestClusterWriteOnlyInt8u : public WriteAttribute { [cluster writeAttributeWriteOnlyInt8uWithValue:value params:params - completionHandler:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TestCluster WriteOnlyInt8u write Error", error); - } - SetCommandExitStatus(error); - }]; + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TestCluster WriteOnlyInt8u write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -93012,7 +92965,7 @@ class ReadTestClusterGeneratedCommandList : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.GeneratedCommandList response %@", [value description]); if (error != nil) { LogNSError("TestCluster GeneratedCommandList read Error", error); @@ -93078,7 +93031,7 @@ class ReadTestClusterAcceptedCommandList : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.AcceptedCommandList response %@", [value description]); if (error != nil) { LogNSError("TestCluster AcceptedCommandList read Error", error); @@ -93144,7 +93097,7 @@ class ReadTestClusterAttributeList : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.AttributeList response %@", [value description]); if (error != nil) { LogNSError("TestCluster AttributeList read Error", error); @@ -93210,7 +93163,7 @@ class ReadTestClusterFeatureMap : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.FeatureMap response %@", [value description]); if (error != nil) { LogNSError("TestCluster FeatureMap read Error", error); @@ -93276,7 +93229,7 @@ class ReadTestClusterClusterRevision : public ReadAttribute { MTRBaseClusterTestCluster * cluster = [[MTRBaseClusterTestCluster alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TestCluster.ClusterRevision response %@", [value description]); if (error != nil) { LogNSError("TestCluster ClusterRevision read Error", error); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index f1e909abd0684a..5f9ded6b07c51b 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -27,6 +27,8 @@ #include // For INFINITY +typedef void (^ResponseHandler)(id _Nullable value, NSError * _Nullable error); + class TestList : public Command { public: TestList() @@ -586,13 +588,13 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } [cluster writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write entries Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write entries Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -607,249 +609,287 @@ class TestAccessControlCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster - readAttributeAclWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + [cluster readAttributeAclWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[0]) - .endpoint, - 0U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[1]) - .cluster, - 1UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[2]) - .cluster, - 2UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[2]) - .endpoint, - 3U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue( - "FabricIndex", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); - VerifyOrReturn(CheckValueNonNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); - VerifyOrReturn(CheckValue("Subjects", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects count], - static_cast(4))); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[0], 4ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[1], 5ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[2], 6ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[3], 7ULL)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[0]) - .endpoint, - 8U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[1]) - .cluster, - 9UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[2]) - .cluster, - 10UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[2]) - .endpoint, - 11U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue( - "FabricIndex", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).privilege, 3U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).authMode, 3U)); - VerifyOrReturn(CheckValueNonNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects)); - VerifyOrReturn(CheckValue("Subjects", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects count], - static_cast(4))); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[0], 12ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[1], 13ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[2], 14ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[3], 15ULL)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[0]) - .endpoint, - 16U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[1]) - .cluster, - 17UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[2]) - .cluster, - 18UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[2]) - .endpoint, - 19U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue( - "FabricIndex", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[0]) + .endpoint, + 0U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[1]) + .cluster, + 1UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[2]) + .cluster, + 2UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[2]) + .endpoint, + 3U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); + VerifyOrReturn(CheckValueNonNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); + VerifyOrReturn(CheckValue("Subjects", + [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects count], + static_cast(4))); + VerifyOrReturn(CheckValue( + "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[0], 4ULL)); + VerifyOrReturn(CheckValue( + "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[1], 5ULL)); + VerifyOrReturn(CheckValue( + "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[2], 6ULL)); + VerifyOrReturn(CheckValue( + "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[3], 7ULL)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[0]) + .endpoint, + 8U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[1]) + .cluster, + 9UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[2]) + .cluster, + 10UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[2]) + .endpoint, + 11U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).privilege, 3U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).authMode, 3U)); + VerifyOrReturn(CheckValueNonNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects)); + VerifyOrReturn(CheckValue("Subjects", + [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects count], + static_cast(4))); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[0], 12ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[1], 13ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[2], 14ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[3], 15ULL)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[0]) + .endpoint, + 16U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[1]) + .cluster, + 17UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[2]) + .cluster, + 18UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[2]) + .endpoint, + 19U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -888,13 +928,13 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } [cluster writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write entries empty lists Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write entries empty lists Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -909,40 +949,39 @@ class TestAccessControlCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster - readAttributeAclWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + [cluster readAttributeAclWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn( - CheckValueNull("Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue( - "FabricIndex", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); - VerifyOrReturn( - CheckValueNull("Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets)); - VerifyOrReturn(CheckValue( - "FabricIndex", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); + VerifyOrReturn(CheckValueNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -974,17 +1013,17 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write entry invalid privilege Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write entry invalid privilege Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1000,28 +1039,28 @@ class TestAccessControlCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeAclWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1053,17 +1092,17 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write entry invalid auth mode Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write entry invalid auth mode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1079,28 +1118,28 @@ class TestAccessControlCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeAclWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1136,17 +1175,17 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write entry invalid subject Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write entry invalid subject Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1162,28 +1201,28 @@ class TestAccessControlCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeAclWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1223,17 +1262,17 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write entry invalid target Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write entry invalid target Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1249,28 +1288,28 @@ class TestAccessControlCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeAclWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1325,17 +1364,17 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write entry too many subjects Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write entry too many subjects Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1351,28 +1390,28 @@ class TestAccessControlCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeAclWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1507,17 +1546,17 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write entry too many targets Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write entry too many targets Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1533,28 +1572,28 @@ class TestAccessControlCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeAclWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1693,17 +1732,17 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write too many entries Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write too many entries Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1718,249 +1757,287 @@ class TestAccessControlCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster - readAttributeAclWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + [cluster readAttributeAclWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[0]) - .endpoint, - 0U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[1]) - .cluster, - 1UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[2]) - .cluster, - 2UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[2]) - .endpoint, - 3U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue( - "FabricIndex", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); - VerifyOrReturn(CheckValueNonNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); - VerifyOrReturn(CheckValue("Subjects", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects count], - static_cast(4))); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[0], 4ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[1], 5ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[2], 6ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[3], 7ULL)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[0]) - .endpoint, - 8U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[1]) - .cluster, - 9UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[2]) - .cluster, - 10UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[2]) - .endpoint, - 11U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue( - "FabricIndex", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).privilege, 3U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).authMode, 3U)); - VerifyOrReturn(CheckValueNonNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects)); - VerifyOrReturn(CheckValue("Subjects", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects count], - static_cast(4))); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[0], 12ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[1], 13ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[2], 14ULL)); - VerifyOrReturn( - CheckValue("", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[3], 15ULL)); - VerifyOrReturn(CheckValueNonNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets)); - VerifyOrReturn(CheckValue("Targets", - [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets count], - static_cast(3))); - VerifyOrReturn(CheckValueNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[0]) - .cluster)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[0]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[0]) - .endpoint, - 16U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[0]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[1]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[1]) - .cluster, - 17UL)); - VerifyOrReturn(CheckValueNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[1]) - .endpoint)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[1]) - .deviceType)); - VerifyOrReturn(CheckValueNonNull("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[2]) - .cluster)); - VerifyOrReturn(CheckValue("Cluster", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[2]) - .cluster, - 18UL)); - VerifyOrReturn(CheckValueNonNull("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[2]) - .endpoint)); - VerifyOrReturn(CheckValue("Endpoint", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[2]) - .endpoint, - 19U)); - VerifyOrReturn(CheckValueNull("DeviceType", - ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]) - .targets[2]) - .deviceType)); - VerifyOrReturn(CheckValue( - "FabricIndex", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[0]) + .endpoint, + 0U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[1]) + .cluster, + 1UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[2]) + .cluster, + 2UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[2]) + .endpoint, + 3U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[0]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); + VerifyOrReturn(CheckValueNonNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); + VerifyOrReturn(CheckValue("Subjects", + [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects count], + static_cast(4))); + VerifyOrReturn(CheckValue( + "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[0], 4ULL)); + VerifyOrReturn(CheckValue( + "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[1], 5ULL)); + VerifyOrReturn(CheckValue( + "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[2], 6ULL)); + VerifyOrReturn(CheckValue( + "", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[3], 7ULL)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[0]) + .endpoint, + 8U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[1]) + .cluster, + 9UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[2]) + .cluster, + 10UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[2]) + .endpoint, + 11U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[1]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).privilege, 3U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).authMode, 3U)); + VerifyOrReturn(CheckValueNonNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects)); + VerifyOrReturn(CheckValue("Subjects", + [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects count], + static_cast(4))); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[0], 12ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[1], 13ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[2], 14ULL)); + VerifyOrReturn(CheckValue("", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[3], 15ULL)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[0]) + .endpoint, + 16U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[1]) + .cluster, + 17UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[2]) + .cluster, + 18UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[2]) + .endpoint, + 19U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((MTRAccessControlClusterTarget *) ((MTRAccessControlClusterAccessControlEntry *) + actualValue[2]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[2]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -1986,13 +2063,13 @@ class TestAccessControlCluster : public TestCommandBridge { aclArgument = temp_0; } [cluster writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Restore ACL Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Restore ACL Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -2008,28 +2085,28 @@ class TestAccessControlCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeAclWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue( - "Privilege", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); - VerifyOrReturn(CheckValue( - "AuthMode", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); - VerifyOrReturn(CheckValueNull( - "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); - VerifyOrReturn(CheckValueNull( - "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("Privilege", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); + VerifyOrReturn(CheckValue("AuthMode", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNull( + "Targets", ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -2042,16 +2119,15 @@ class TestAccessControlCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Validate resource minima (SubjectsPerAccessControlEntry) Error: %@", err); + [cluster readAttributeSubjectsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Validate resource minima (SubjectsPerAccessControlEntry) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("subjectsPerAccessControlEntry", [value unsignedShortValue], 4U)); + VerifyOrReturn(CheckConstraintMinValue("subjectsPerAccessControlEntry", [value unsignedShortValue], 4U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -2064,16 +2140,15 @@ class TestAccessControlCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeTargetsPerAccessControlEntryWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Validate resource minima (TargetsPerAccessControlEntry) Error: %@", err); + [cluster readAttributeTargetsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Validate resource minima (TargetsPerAccessControlEntry) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("targetsPerAccessControlEntry", [value unsignedShortValue], 3U)); + VerifyOrReturn(CheckConstraintMinValue("targetsPerAccessControlEntry", [value unsignedShortValue], 3U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -2086,16 +2161,15 @@ class TestAccessControlCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeAccessControlEntriesPerFabricWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Validate resource minima (AccessControlEntriesPerFabric) Error: %@", err); + [cluster readAttributeAccessControlEntriesPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Validate resource minima (AccessControlEntriesPerFabric) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("accessControlEntriesPerFabric", [value unsignedShortValue], 3U)); + VerifyOrReturn(CheckConstraintMinValue("accessControlEntriesPerFabric", [value unsignedShortValue], 3U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -2238,7 +2312,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ClusterRevision attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2263,7 +2337,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads FeatureMap attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2288,7 +2362,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2318,7 +2392,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (Extension) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2340,7 +2414,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2365,7 +2439,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2507,8 +2581,7 @@ class Test_TC_ACL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSubjectsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads SubjectsPerAccessControlEntry attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2531,8 +2604,7 @@ class Test_TC_ACL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetsPerAccessControlEntryWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads TargetsPerAccessControlEntry attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2555,8 +2627,7 @@ class Test_TC_ACL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAccessControlEntriesPerFabricWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAccessControlEntriesPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AccessControlEntriesPerFabric attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2683,7 +2754,7 @@ class Test_TC_ACL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeServerListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH1 reads DUT Descriptor cluster ServerList attribute from Endpoint 0 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2834,7 +2905,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2859,7 +2930,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2884,7 +2955,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2911,7 +2982,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -2936,7 +3007,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3056,7 +3127,7 @@ class Test_TC_BOOL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStateValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read mandatory non-global attribute: StateValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3206,7 +3277,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3231,7 +3302,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3256,7 +3327,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3284,7 +3355,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(SetupURL) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3306,7 +3377,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3327,7 +3398,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3471,7 +3542,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3496,7 +3567,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3521,7 +3592,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3548,7 +3619,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -3573,7 +3644,7 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4189,7 +4260,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4214,7 +4285,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4239,7 +4310,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given CC.S.F00(HS) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4259,7 +4330,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given CC.S.F01(EHue) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4279,7 +4350,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given CC.S.F02(CL) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4299,7 +4370,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given CC.S.F03(XY) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4319,7 +4390,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given CC.S.F04(CT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4339,7 +4410,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4369,7 +4440,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentHue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4391,7 +4462,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentSaturation) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4413,7 +4484,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(RemainingTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4435,7 +4506,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentX) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4457,7 +4528,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentY) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4479,7 +4550,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(DriftCompensation) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4501,7 +4572,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CompensationText) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4523,7 +4594,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorTemperatureMireds) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4545,7 +4616,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(EnhancedCurrentHue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4567,7 +4638,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorLoopActive) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4589,7 +4660,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorLoopDirection) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4611,7 +4682,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorLoopTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4633,7 +4704,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4655,7 +4726,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4677,7 +4748,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4699,7 +4770,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4721,7 +4792,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4743,7 +4814,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4765,7 +4836,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveToHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4787,7 +4858,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4809,7 +4880,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StepHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4831,7 +4902,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveToSaturation) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4853,7 +4924,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveSaturation) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4875,7 +4946,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StepSaturation) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4897,7 +4968,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4919,7 +4990,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveToColor) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4941,7 +5012,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveColor) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4963,7 +5034,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StepColor) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -4985,7 +5056,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveToColorTemperature) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5007,7 +5078,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(EnhancedMoveToHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5029,7 +5100,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(EnhancedMoveHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5051,7 +5122,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(EnhancedStepHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5073,7 +5144,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5095,7 +5166,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(ColorLoopSet) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5117,7 +5188,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StopMoveStep) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5139,7 +5210,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(MoveColorTemperature) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5161,7 +5232,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StepColorTemperature) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5183,7 +5254,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5908,7 +5979,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5931,7 +6002,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5954,7 +6025,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads RemainingTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5977,7 +6048,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6000,7 +6071,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6023,7 +6094,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDriftCompensationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads DriftCompensation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6046,7 +6117,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCompensationTextWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CompensationText attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6067,7 +6138,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6090,7 +6161,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6113,7 +6184,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Options attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6136,7 +6207,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6159,7 +6230,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6182,7 +6253,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorLoopActive attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6205,7 +6276,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopDirectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorLoopDirection attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6228,7 +6299,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorLoopTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6251,18 +6322,17 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeColorLoopStartEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorLoopStartEnhancedHue attribute from DUT Error: %@", err); + [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorLoopStartEnhancedHue attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopStartEnhancedHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorLoopStartEnhancedHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorLoopStartEnhancedHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("colorLoopStartEnhancedHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorLoopStartEnhancedHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorLoopStartEnhancedHue", [value unsignedShortValue], 65535U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -6275,18 +6345,17 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorLoopStoredEnhancedHue attribute from DUT Error: %@", err); + [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorLoopStoredEnhancedHue attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorLoopStoredEnhancedHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorLoopStoredEnhancedHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorLoopStoredEnhancedHue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorLoopStoredEnhancedHue", [value unsignedShortValue], 65535U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -6300,7 +6369,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Saving for comparision in step 19 reads FeatureMap attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6323,7 +6392,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorCapabilitiesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorCapabilities attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6351,18 +6420,17 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); + [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -6375,18 +6443,17 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT Error: %@", err); + [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -6399,8 +6466,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CoupleColorTempToLevelMinMireds attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6424,8 +6490,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads StartUpColorTemperatureMireds attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6452,7 +6517,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfPrimariesWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NumberOfPrimaries attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6658,7 +6723,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWhitePointXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads WhitePointX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6681,7 +6746,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWhitePointYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads WhitePointY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6704,7 +6769,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointRXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointRX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6727,7 +6792,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointRYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointRY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6750,7 +6815,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointRIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointRIntensity attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6776,7 +6841,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointGXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointGX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6799,7 +6864,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointGYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointGY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6822,7 +6887,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointGIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointGIntensity attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6848,7 +6913,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointBXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointBX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6871,7 +6936,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointBYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointBY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6894,7 +6959,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorPointBIntensityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorPointBIntensity attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7305,13 +7370,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -7322,7 +7387,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7348,15 +7413,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " - @"TransitionTime=0 (immediately) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " + @"TransitionTime=0 (immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -7382,13 +7447,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s) Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -7408,7 +7473,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7437,7 +7502,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7472,13 +7537,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -7491,7 +7556,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7520,7 +7585,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7549,15 +7614,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and " - @"TransitionTime=0 (immediately) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and " + @"TransitionTime=0 (immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -7583,13 +7648,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s) Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -7609,7 +7674,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7638,7 +7703,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7673,13 +7738,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -7692,7 +7757,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7721,7 +7786,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7743,7 +7808,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7770,7 +7835,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7795,7 +7860,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7812,7 +7877,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8163,13 +8228,13 @@ class Test_TC_CC_3_3 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -8180,7 +8245,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8206,15 +8271,15 @@ class Test_TC_CC_3_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " - @"TransitionTime=0 (immediately) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " + @"TransitionTime=0 (immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -8240,17 +8305,16 @@ class Test_TC_CC_3_3 : public TestCommandBridge { params.transitionTime = [NSNumber numberWithUnsignedChar:200U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - stepHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"TH sends StepHue command to DUT with StepMode=0x01 (up), StepSize=60 and TransitionTime=200 (20s) Error: %@", - err); + [cluster stepHueWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends StepHue command to DUT with StepMode=0x01 (up), StepSize=60 and TransitionTime=200 " + @"(20s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -8270,7 +8334,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8299,7 +8363,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8328,7 +8392,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8357,15 +8421,15 @@ class Test_TC_CC_3_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHue command to DUT with Hue=50, Direction=0x00 (shortest distance) and " - @"TransitionTime=0 (immediately) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToHue command to DUT with Hue=50, Direction=0x00 (shortest distance) and " + @"TransitionTime=0 (immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -8392,15 +8456,15 @@ class Test_TC_CC_3_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepHue command to DUT with StepMode=0x03 (down), StepSize=60 and TransitionTime=200 (20s) " - @"Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends StepHue command to DUT with StepMode=0x03 (down), StepSize=60 and TransitionTime=200 " + @"(20s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -8420,7 +8484,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8449,7 +8513,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8478,7 +8542,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8500,7 +8564,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8527,7 +8591,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8552,7 +8616,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8569,7 +8633,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8852,13 +8916,13 @@ class Test_TC_CC_4_1 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -8869,7 +8933,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8894,15 +8958,15 @@ class Test_TC_CC_4_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=60 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=60 and TransitionTime=0 " + @"(immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -8927,17 +8991,16 @@ class Test_TC_CC_4_1 : public TestCommandBridge { params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - moveToSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=300 (30s) Error: %@", - err); + [cluster moveToSaturationWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=300 " + @"(30s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -8957,7 +9020,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8986,7 +9049,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9015,7 +9078,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9044,7 +9107,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9066,7 +9129,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9093,7 +9156,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9118,7 +9181,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9135,7 +9198,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9575,13 +9638,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -9592,7 +9655,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9617,15 +9680,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 " + @"(immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -9652,13 +9715,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s) Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog( + @"TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -9678,7 +9743,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9707,7 +9772,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9736,7 +9801,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9764,15 +9829,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=0 " + @"(immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -9797,16 +9862,16 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.rate = [NSNumber numberWithUnsignedChar:5U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"TH sends MoveSaturation command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s) Error: %@", err); + [cluster moveSaturationWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveSaturation command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s) " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -9826,7 +9891,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9855,7 +9920,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9884,7 +9949,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9912,15 +9977,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 " + @"(immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -9947,13 +10012,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s) Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog( + @"TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -9973,7 +10040,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10000,16 +10067,16 @@ class Test_TC_CC_4_2 : public TestCommandBridge { params.rate = [NSNumber numberWithUnsignedChar:5U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"TH sends MoveSaturation command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", err); + [cluster moveSaturationWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveSaturation command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -10022,7 +10089,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10051,7 +10118,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10073,7 +10140,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10100,7 +10167,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10125,7 +10192,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10142,7 +10209,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10555,13 +10622,13 @@ class Test_TC_CC_4_3 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -10572,7 +10639,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10597,15 +10664,15 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=200 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=200 and TransitionTime=0 " + @"(immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -10632,15 +10699,15 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=40 and " - @"TransitionTime=200 (20s) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=40 and " + @"TransitionTime=200 (20s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -10660,7 +10727,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10689,7 +10756,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10718,7 +10785,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10747,15 +10814,15 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=20 and " - @"TransitionTime=100 (10s) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=20 and " + @"TransitionTime=100 (10s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -10775,7 +10842,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10803,15 +10870,15 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=50 and TransitionTime=0 " - @"(immediately) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=50 and TransitionTime=0 " + @"(immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -10838,15 +10905,15 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=40 and " - @"TransitionTime=200 (20s) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=40 and " + @"TransitionTime=200 (20s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -10866,7 +10933,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10895,7 +10962,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10924,7 +10991,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10953,15 +11020,15 @@ class Test_TC_CC_4_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=20 and " - @"TransitionTime=100 (10 s) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=20 and " + @"TransitionTime=100 (10 s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -10981,7 +11048,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11005,7 +11072,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11032,7 +11099,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11057,7 +11124,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11074,7 +11141,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11393,13 +11460,13 @@ class Test_TC_CC_4_4 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -11410,7 +11477,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11436,15 +11503,15 @@ class Test_TC_CC_4_4 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueAndSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHueAndSaturation command to DUT with Hue=200, Saturation=50 and " - @"TransitionTime=0 (immediately) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToHueAndSaturation command to DUT with Hue=200, Saturation=50 and " + @"TransitionTime=0 (immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -11464,7 +11531,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11486,7 +11553,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11515,15 +11582,15 @@ class Test_TC_CC_4_4 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToHueAndSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHueAndSaturation command to DUT with Hue=160, Saturation=80 and " - @"TransitionTime=200 (20s) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToHueAndSaturation command to DUT with Hue=160, Saturation=80 and " + @"TransitionTime=200 (20s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -11543,7 +11610,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11565,7 +11632,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11594,7 +11661,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11616,7 +11683,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11646,7 +11713,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11668,7 +11735,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11690,7 +11757,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11717,7 +11784,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11742,7 +11809,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11759,7 +11826,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12480,13 +12547,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -12497,7 +12564,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12523,15 +12590,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC " + @"TransitionTime = 0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -12551,7 +12618,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12573,7 +12640,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12602,15 +12669,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " - @"TransitionTime = 200 (20s) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " + @"TransitionTime = 200 (20s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -12630,7 +12697,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12652,7 +12719,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12681,7 +12748,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12703,7 +12770,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12732,7 +12799,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12754,7 +12821,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12779,13 +12846,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -12798,7 +12865,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH read Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12820,7 +12887,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12846,15 +12913,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToColor command to the DUT with ColorX = 32768/0x8000 (x=0.5) (purple) ColorY = " - @"19660/0x4CCC (y=0.3) TransitionTime = 0 (immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToColor command to the DUT with ColorX = 32768/0x8000 (x=0.5) (purple) " + @"ColorY = 19660/0x4CCC (y=0.3) TransitionTime = 0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -12874,7 +12941,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12896,7 +12963,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12916,7 +12983,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12942,15 +13009,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " + @"TransitionTime = 0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -12970,7 +13037,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -12994,7 +13061,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13025,15 +13092,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 " + @"TransitionTime = 0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -13053,7 +13120,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13077,7 +13144,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13108,15 +13175,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 " + @"TransitionTime = 0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -13136,7 +13203,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13158,7 +13225,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13183,13 +13250,13 @@ class Test_TC_CC_5_1 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 1 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 1 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -13202,7 +13269,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH read Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13224,7 +13291,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13250,15 +13317,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC " + @"TransitionTime = 0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -13278,7 +13345,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13300,7 +13367,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13320,7 +13387,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13346,15 +13413,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " + @"TransitionTime = 0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -13374,7 +13441,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13396,7 +13463,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13425,15 +13492,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 " + @"TransitionTime = 0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -13453,7 +13520,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13477,7 +13544,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13508,15 +13575,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 " - @"TransitionTime = 0 (immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 " + @"TransitionTime = 0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -13536,7 +13603,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13558,7 +13625,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13580,7 +13647,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13607,7 +13674,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13938,13 +14005,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -13955,7 +14022,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -13981,15 +14048,15 @@ class Test_TC_CC_5_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 26000 TransitionTime = 0 " - @"(immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 26000 TransitionTime = 0 " + @"(immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -14015,13 +14082,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveColor command to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveColor command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -14041,7 +14108,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14063,7 +14130,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14092,7 +14159,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14114,7 +14181,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14144,7 +14211,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14170,7 +14237,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14199,13 +14266,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopMoveStepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StopMoveStep command to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends StopMoveStep command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -14218,7 +14285,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14240,7 +14307,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14262,7 +14329,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14289,7 +14356,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14314,7 +14381,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14331,7 +14398,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14628,13 +14695,13 @@ class Test_TC_CC_5_3 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -14645,7 +14712,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14671,15 +14738,15 @@ class Test_TC_CC_5_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 20000 TransitionTime = 0 " - @"(immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 20000 TransitionTime = 0 " + @"(immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -14706,15 +14773,15 @@ class Test_TC_CC_5_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepColor command to DUT, with StepX = -20000, StepY = -6000, TransitionTime = 200 (20s) " - @"Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends StepColor command to DUT, with StepX = -20000, StepY = -6000, TransitionTime = 200 " + @"(20s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -14734,7 +14801,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14756,7 +14823,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14785,7 +14852,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14807,7 +14874,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14836,7 +14903,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14858,7 +14925,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14880,7 +14947,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14907,7 +14974,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14932,7 +14999,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14949,7 +15016,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15264,13 +15331,13 @@ class Test_TC_CC_6_1 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -15281,7 +15348,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15301,21 +15368,20 @@ class Test_TC_CC_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); + [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); - { - ColorTempPhysicalMinMiredsValue = value; - } + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMinMiredsValue = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -15329,21 +15395,20 @@ class Test_TC_CC_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT. Error: %@", err); + [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT. Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); - { - ColorTempPhysicalMaxMiredsValue = value; - } + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMaxMiredsValue = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -15356,7 +15421,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15387,15 +15452,15 @@ class Test_TC_CC_6_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds=310 and " - @"TransitionTime=0 (immediately). Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds=310 " + @"and TransitionTime=0 (immediately). Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -15421,15 +15486,15 @@ class Test_TC_CC_6_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColorTemperatur command to DUT with ColorTemperatureMireds=250 and " - @"TransitionTime=300 (30s). Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColorTemperatur command to DUT with ColorTemperatureMireds=250 " + @"and TransitionTime=300 (30s). Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -15449,7 +15514,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15478,7 +15543,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15507,7 +15572,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15536,7 +15601,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15558,7 +15623,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15585,7 +15650,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15610,7 +15675,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn Off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -15627,7 +15692,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16014,13 +16079,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -16031,7 +16096,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16058,15 +16123,15 @@ class Test_TC_CC_7_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 (shortest " - @"distance) and TransitionTime=0 (immediately). Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 " + @"(shortest distance) and TransitionTime=0 (immediately). Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -16093,15 +16158,15 @@ class Test_TC_CC_7_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedStepHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode=0x01 (up), StepSize=6000 and " - @"TransitionTime=300 (30s). Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode=0x01 (up), StepSize=6000 and " + @"TransitionTime=300 (30s). Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -16121,7 +16186,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16150,7 +16215,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16179,7 +16244,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16208,7 +16273,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16238,15 +16303,15 @@ class Test_TC_CC_7_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveToHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x00 (shortest " - @"distance) and TransitionTime=0 (immediately). Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x00 " + @"(shortest distance) and TransitionTime=0 (immediately). Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -16273,15 +16338,15 @@ class Test_TC_CC_7_3 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedStepHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode=0x03 (down), StepSize=6000 and " - @"TransitionTime=300 (30s) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode=0x03 (down), StepSize=6000 and " + @"TransitionTime=300 (30s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -16301,7 +16366,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16330,7 +16395,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16359,7 +16424,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16388,7 +16453,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16410,7 +16475,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16437,7 +16502,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16462,7 +16527,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn Off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16479,7 +16544,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16798,13 +16863,13 @@ class Test_TC_CC_7_4 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -16815,7 +16880,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16841,16 +16906,18 @@ class Test_TC_CC_7_4 : public TestCommandBridge { params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveToHueAndSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=20000, " + [cluster + enhancedMoveToHueAndSaturationWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=20000, " @"Saturation=50 and TransitionTime=0 (immediately) Error: %@", - err); + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -16870,7 +16937,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16892,7 +16959,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16921,15 +16988,15 @@ class Test_TC_CC_7_4 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedMoveToHueAndSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=16000, " - @"Saturation=80 and TransitionTime=200 (20s) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveToHueAndSaturation command to DUT with " + @"EnhancedHue=16000, Saturation=80 and TransitionTime=200 (20s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -16949,7 +17016,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16972,7 +17039,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17001,7 +17068,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17024,7 +17091,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17053,7 +17120,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17077,7 +17144,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17101,7 +17168,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17128,7 +17195,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17153,7 +17220,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn Off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17170,7 +17237,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17312,7 +17379,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17336,7 +17403,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17360,7 +17427,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17391,7 +17458,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17419,7 +17486,7 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17649,7 +17716,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17672,7 +17739,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17695,7 +17762,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17731,7 +17798,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(ManufacturingDate) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17751,7 +17818,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(PartNumber) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17771,7 +17838,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(ProductURL) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17791,7 +17858,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(ProductLabel) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17811,7 +17878,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(SerialNumber) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17831,7 +17898,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(LocalConfigDisabled) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17851,7 +17918,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(Reachable) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17871,7 +17938,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(UniqueID) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17891,7 +17958,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH1 reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -17914,7 +17981,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH1 reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18128,7 +18195,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18153,7 +18220,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18178,7 +18245,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18208,7 +18275,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18233,7 +18300,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18377,7 +18444,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18402,7 +18469,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18427,7 +18494,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18453,7 +18520,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18479,7 +18546,7 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18773,7 +18840,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18797,7 +18864,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18821,7 +18888,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DGETH.S.F00 ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18840,7 +18907,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DGETH.S.F01 ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18859,7 +18926,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18884,7 +18951,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(PHYRate) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18905,7 +18972,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(FullDuplex) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -18926,7 +18993,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog( @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList Error: %@", err); @@ -18949,7 +19016,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog( @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F00(PKTCNT)) in AttributeList Error: %@", err); @@ -18972,7 +19039,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog( @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", err); @@ -18995,7 +19062,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog( @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", err); @@ -19018,7 +19085,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog( @"TH reads optional attribute(PacketRxCount) and Feature dependent(DGETH.S.F01(ERRCNT)) in AttributeList Error: %@", err); @@ -19041,7 +19108,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(CarrierDetect) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19062,7 +19129,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(TimeSinceReset) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19083,7 +19150,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19104,7 +19171,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19128,7 +19195,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19426,7 +19493,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read PHYRate attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19451,7 +19518,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFullDuplexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read FullDuplex attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19474,7 +19541,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read PacketRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19502,7 +19569,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read PacketTxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19530,7 +19597,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read TxErrCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19559,7 +19626,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read CollisionCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19588,7 +19655,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read OverrunCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19617,7 +19684,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCarrierDetectWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read CarrierDetect attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19650,7 +19717,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTimeSinceResetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read TimeSinceReset attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19993,7 +20060,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20018,7 +20085,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20043,7 +20110,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20068,7 +20135,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20093,7 +20160,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20118,7 +20185,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20143,7 +20210,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20168,7 +20235,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20193,7 +20260,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20218,7 +20285,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PHYRate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20244,7 +20311,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20267,7 +20334,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20290,7 +20357,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20313,7 +20380,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20336,7 +20403,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20358,7 +20425,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { + [cluster resetCountsWithCompletion:^(NSError * _Nullable err) { NSLog(@"Sends ResetCounts command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20376,7 +20443,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PacketRxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20396,7 +20463,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads PacketTxCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20416,7 +20483,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads TxErrCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20436,7 +20503,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CollisionCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20456,7 +20523,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads OverrunCount attribute value from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20607,7 +20674,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20632,7 +20699,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20657,7 +20724,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20686,7 +20753,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20708,7 +20775,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20733,7 +20800,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20886,7 +20953,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20912,7 +20979,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20938,7 +21005,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -20964,7 +21031,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads from the DUT the Tolerance attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21106,7 +21173,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21131,7 +21198,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21156,7 +21223,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21183,7 +21250,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21208,7 +21275,7 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21352,7 +21419,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21377,7 +21444,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21402,7 +21469,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21433,7 +21500,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21457,7 +21524,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21645,7 +21712,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH1 reads the BreadCrumb Attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21668,13 +21735,13 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { id breadcrumbArgument; breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH1 writes the BreadCrumb attribute as 1 to the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH1 writes the BreadCrumb attribute as 1 to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -21687,7 +21754,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH1 reads the BreadCrumb attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21711,7 +21778,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRegulatoryConfigWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH1 reads the RegulatoryConfig attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21733,7 +21800,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocationCapabilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH1 reads the LocationCapability attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -21756,7 +21823,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBasicCommissioningInfoWithCompletionHandler:^( + [cluster readAttributeBasicCommissioningInfoWithCompletion:^( MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable err) { NSLog( @"TH1 reads BasicCommissioningInfo attribute from DUT and Verify that the BasicCommissioningInfo attribute has the " @@ -21779,15 +21846,14 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeSupportsConcurrentConnectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads SupportsConcurrentConnection attribute from the DUT Error: %@", err); + [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH1 reads SupportsConcurrentConnection attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "boolean", "boolean")); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "boolean", "boolean")); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -21985,7 +22051,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22010,7 +22076,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22035,7 +22101,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22064,7 +22130,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(UpTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22086,7 +22152,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(TotalOperationalHours) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22108,7 +22174,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(BootReason) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22130,7 +22196,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(ActiveHardwareFaults) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22152,7 +22218,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(ActiveRadioFaults) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22174,7 +22240,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute(ActiveNetworkFaults) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22196,7 +22262,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22218,7 +22284,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22508,7 +22574,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNetworkInterfacesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NetworkInterfaces structure attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22528,7 +22594,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRebootCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads a RebootCount attribute value from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22590,7 +22656,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUpTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of DUT rebooting. " @"Error: %@", err); @@ -22612,7 +22678,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTotalOperationalHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads a TotalOperationalHours attribute value from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22658,7 +22724,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBootReasonsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBootReasonsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads BootReason attribute value from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22846,7 +22912,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22871,7 +22937,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22896,7 +22962,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22924,7 +22990,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22946,7 +23012,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(TriggerEffect) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -22968,7 +23034,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23091,7 +23157,7 @@ class Test_TC_I_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the IdentifyTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23114,7 +23180,7 @@ class Test_TC_I_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the IdentifyType attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23331,13 +23397,14 @@ class Test_TC_I_2_2 : public TestCommandBridge { __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; params.identifyTime = [NSNumber numberWithUnsignedShort:60U]; [cluster identifyWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Identify command to DUT, with the identify time field set to 0x003c (60s). Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Identify command to DUT, with the identify time field set to 0x003c (60s). Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -23350,7 +23417,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23379,7 +23446,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"After 10 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23413,17 +23480,16 @@ class Test_TC_I_2_2 : public TestCommandBridge { __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; params.identifyTime = [NSNumber numberWithUnsignedShort:0U]; - [cluster - identifyWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"TH sends Identify command to DUT, with the identify time field set to 0x0000 (stop identifying). Error: %@", - err); + [cluster identifyWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Identify command to DUT, with the identify time field set to 0x0000 (stop " + @"identifying). Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -23436,7 +23502,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads immediately IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23463,13 +23529,14 @@ class Test_TC_I_2_2 : public TestCommandBridge { id identifyTimeArgument; identifyTimeArgument = [NSNumber numberWithUnsignedShort:15U]; [cluster writeAttributeIdentifyTimeWithValue:identifyTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -23489,7 +23556,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"After 5 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23840,15 +23907,15 @@ class Test_TC_I_2_3 : public TestCommandBridge { params.effectIdentifier = [NSNumber numberWithUnsignedChar:0U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and " - @"the effect variant field set to 0x00 default Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink " + @"and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -23875,15 +23942,15 @@ class Test_TC_I_2_3 : public TestCommandBridge { params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and " - @"the effect variant field set to 0x00 default Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 " + @"breathe and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -23910,15 +23977,15 @@ class Test_TC_I_2_3 : public TestCommandBridge { params.effectIdentifier = [NSNumber numberWithUnsignedChar:2U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x02 okay and the " - @"effect variant field set to 0x00 default Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x02 okay " + @"and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -23945,15 +24012,15 @@ class Test_TC_I_2_3 : public TestCommandBridge { params.effectIdentifier = [NSNumber numberWithUnsignedChar:11U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x0b channel " - @"change and the effect variant field set to 0x00 default Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x0b " + @"channel change and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -23980,15 +24047,15 @@ class Test_TC_I_2_3 : public TestCommandBridge { params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and " - @"the effect variant field set to 0x00 default Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 " + @"breathe and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -24015,15 +24082,15 @@ class Test_TC_I_2_3 : public TestCommandBridge { params.effectIdentifier = [NSNumber numberWithUnsignedChar:254U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xfe finish " - @"effect and the effect variant field set to 0x00 default Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xfe " + @"finish effect and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -24050,15 +24117,15 @@ class Test_TC_I_2_3 : public TestCommandBridge { params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and " - @"the effect variant field set to 0x00 default Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 " + @"breathe and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -24085,15 +24152,15 @@ class Test_TC_I_2_3 : public TestCommandBridge { params.effectIdentifier = [NSNumber numberWithUnsignedChar:255U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop effect " - @"and the effect variant field set to 0x00 default Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " + @"effect and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -24120,15 +24187,15 @@ class Test_TC_I_2_3 : public TestCommandBridge { params.effectIdentifier = [NSNumber numberWithUnsignedChar:0U]; params.effectVariant = [NSNumber numberWithUnsignedChar:66U]; [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and " - @"the effect variant field set to 0x42 unknown Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink " + @"and the effect variant field set to 0x42 unknown Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -24155,15 +24222,15 @@ class Test_TC_I_2_3 : public TestCommandBridge { params.effectIdentifier = [NSNumber numberWithUnsignedChar:255U]; params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop effect " - @"and the effect variant field set to 0x00 default Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " + @"effect and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -24325,7 +24392,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24349,7 +24416,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24373,7 +24440,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24401,7 +24468,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24422,7 +24489,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(LightSensorType) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24443,7 +24510,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24467,7 +24534,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24630,7 +24697,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24655,7 +24722,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24680,7 +24747,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads MeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24705,7 +24772,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Tolerance attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24727,7 +24794,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLightSensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LightSensorType attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24917,7 +24984,7 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24944,7 +25011,7 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -24986,7 +25053,7 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"After a few seconds, TH reads MeasuredValue attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25026,7 +25093,7 @@ class Test_TC_ILL_2_2 : public TestCommandBridge { [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"After a few seconds, TH reads MeasuredValue attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25310,7 +25377,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25335,7 +25402,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25360,7 +25427,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given LVL.S.F00(OO) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25380,7 +25447,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given LVL.S.F01(LT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25400,7 +25467,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given LVL.S.F02(FQ) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25420,7 +25487,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25449,7 +25516,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25472,7 +25539,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25496,7 +25563,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(MinLevel) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25518,7 +25585,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(MaxLevel) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25540,7 +25607,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(OnOffTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25562,7 +25629,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(OnTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25584,7 +25651,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(OffTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25606,7 +25673,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(DefaultMoveRate) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25628,7 +25695,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25657,7 +25724,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature-dependent(LVL.S.F02) command in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -25679,7 +25746,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26009,7 +26076,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26038,7 +26105,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the RemainingTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26062,7 +26129,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MinLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26092,7 +26159,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MinLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26119,7 +26186,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MaxLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26150,7 +26217,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MaxLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26177,7 +26244,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26203,7 +26270,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Step 4b & 4C Reads the CurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26231,7 +26298,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentFrequency attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26255,7 +26322,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MinFrequency attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26282,7 +26349,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the MaxFrequency attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26308,7 +26375,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Step 7b & 7C Reads the CurrentFrequency attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26331,7 +26398,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnOffTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26354,7 +26421,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26380,7 +26447,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26408,7 +26475,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26434,7 +26501,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OffTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26460,7 +26527,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the DefaultMoveRate attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26486,7 +26553,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26506,7 +26573,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the StartUpCurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26838,7 +26905,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26869,13 +26936,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { ? [NSNumber numberWithUnsignedShort:mOnOffTransitionTimeConfigValue.Value()] : [NSNumber numberWithUnsignedShort:10U]; [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"writes the OnOffTransitionTime attribute on the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"writes the OnOffTransitionTime attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -26888,7 +26955,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26917,7 +26984,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -26950,13 +27017,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { onLevelArgument = mOnLevelConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mOnLevelConfigValue.Value()] : [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeOnLevelWithValue:onLevelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"writes the OnLevel attribute on the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"writes the OnLevel attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -26969,7 +27036,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27001,7 +27068,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27035,13 +27102,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { ? [NSNumber numberWithUnsignedShort:mOnTransitionTimeConfigValue.Value()] : [NSNumber numberWithUnsignedShort:5U]; [cluster writeAttributeOnTransitionTimeWithValue:onTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the OnTransitionTime attribute on the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes the OnTransitionTime attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -27054,7 +27121,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27086,7 +27153,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27120,13 +27187,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { ? [NSNumber numberWithUnsignedShort:mOffTransitionTimeConfigValue.Value()] : [NSNumber numberWithUnsignedShort:10U]; [cluster writeAttributeOffTransitionTimeWithValue:offTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the OffTransitionTime attribute on the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes the OffTransitionTime attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -27139,7 +27206,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27171,7 +27238,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the DefaultMoveRate attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27205,13 +27272,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { ? [NSNumber numberWithUnsignedChar:mDefaultMoveRateConfigValue.Value()] : [NSNumber numberWithUnsignedChar:111U]; [cluster writeAttributeDefaultMoveRateWithValue:defaultMoveRateArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the DefaultMoveRate attribute on the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes the DefaultMoveRate attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -27224,7 +27291,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the DefaultMoveRate attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27256,7 +27323,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27290,13 +27357,13 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { ? [NSNumber numberWithUnsignedChar:mStartUpCurrentLevelConfigValue.Value()] : [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeStartUpCurrentLevelWithValue:startUpCurrentLevelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"writes the StartUpCurrentLevel attribute on the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"writes the StartUpCurrentLevel attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -27309,7 +27376,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27342,14 +27409,15 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"writes back default value of OnOffTransitionTime attribute Error: %@", err); + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"writes back default value of OnOffTransitionTime attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -27928,7 +27996,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"Precondition Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27945,7 +28013,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -27971,15 +28039,17 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -27995,13 +28065,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28012,7 +28082,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28037,15 +28107,15 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithOnOffWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 " - @"(immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime " + @"=0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28056,7 +28126,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28080,7 +28150,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28103,7 +28173,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28127,15 +28197,17 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); + [cluster + moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28148,7 +28220,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28180,15 +28252,15 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). This " - @"means the level should increase by 150 units in 30s, so 5 units/s Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 " + @"s). This means the level should increase by 150 units in 30s, so 5 units/s Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28208,7 +28280,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28240,7 +28312,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28272,7 +28344,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28304,7 +28376,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28329,7 +28401,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28357,13 +28429,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28376,7 +28448,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28398,7 +28470,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28423,13 +28495,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28442,7 +28514,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28465,7 +28537,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28490,13 +28562,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28509,7 +28581,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28540,13 +28612,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28559,7 +28631,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28590,13 +28662,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28609,7 +28681,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28637,13 +28709,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 1 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 1 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28656,7 +28728,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28678,7 +28750,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28703,13 +28775,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28722,7 +28794,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28745,7 +28817,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28770,13 +28842,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28789,7 +28861,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28820,13 +28892,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28839,7 +28911,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28870,13 +28942,13 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveToLevel command to the DUT with Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -28889,7 +28961,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29254,7 +29326,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"Precondition Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29271,7 +29343,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29297,15 +29369,17 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -29321,13 +29395,13 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -29340,7 +29414,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the MaxLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29361,7 +29435,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29385,16 +29459,16 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { params.rate = [NSNumber numberWithUnsignedChar:10U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - moveWithOnOffWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 (units/s) Error: %@", - err); + [cluster moveWithOnOffWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a MoveWithOnOff command to DUT, with MoveMode =0x00 (up) and Rate =10 (units/s) " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -29405,7 +29479,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29430,7 +29504,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29464,7 +29538,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29487,7 +29561,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29511,15 +29585,17 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); + [cluster + moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -29532,7 +29608,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29563,13 +29639,13 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s) Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a Move command to the DUT with MoveMode =0x00 (up) and Rate =5 (units/s) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -29589,7 +29665,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29621,7 +29697,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29653,7 +29729,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29685,7 +29761,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29708,7 +29784,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Precondition send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29725,7 +29801,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30063,7 +30139,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"Precondition Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30080,7 +30156,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30106,15 +30182,17 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -30130,13 +30208,13 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -30147,7 +30225,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30173,15 +30251,15 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepWithOnOffWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and " - @"TransitionTime =0 (immediate) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a StepWithOnOff command to DUT, with StepMode =0x00 (up), StepSize =50 and " + @"TransitionTime =0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -30192,7 +30270,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads OnOff attribute (On/Off cluster) from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30214,7 +30292,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30238,15 +30316,17 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); + [cluster + moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -30259,7 +30339,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads current level attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30290,17 +30370,16 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - stepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and TransitionTime =300 Error: %@", - err); + [cluster stepWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a Step command to the DUT with StepMode =0x00 (up), StepSize =150 and TransitionTime " + @"=300 Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -30320,7 +30399,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30352,7 +30431,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30384,7 +30463,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30416,7 +30495,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30441,7 +30520,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT (after DUT has finished the transition) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30464,7 +30543,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Precondition send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30481,7 +30560,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30775,15 +30854,17 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: write default value of OnOffTransitionTime attribute Error: %@", - err); + [cluster + writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Precondition: write default value of OnOffTransitionTime attribute Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -30799,13 +30880,13 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { id optionsArgument; optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -30816,7 +30897,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30840,15 +30921,17 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", - err); + [cluster + moveToLevelWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -30861,7 +30944,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30892,15 +30975,15 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate field set " - @"to 0x05 (5 units/s) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate " + @"field set to 0x05 (5 units/s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -30924,13 +31007,13 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends stop command to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Sends stop command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -30952,7 +31035,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30983,15 +31066,15 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate field set " - @"to 0x05 (5 units/s) Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a Move command to the DUT, with the MoveMode field set to 0x00 (move up) and the Rate " + @"field set to 0x05 (5 units/s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -31015,13 +31098,13 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopWithOnOffWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a StopWithOnOff command to the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a StopWithOnOff command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -31043,7 +31126,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31066,7 +31149,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Precondition send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31083,7 +31166,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31225,7 +31308,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31249,7 +31332,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31273,7 +31356,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31300,7 +31383,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31324,7 +31407,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31510,7 +31593,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31535,7 +31618,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31560,7 +31643,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31580,7 +31663,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31606,7 +31689,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31628,7 +31711,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31653,7 +31736,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31840,7 +31923,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31864,7 +31947,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31886,7 +31969,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31912,7 +31995,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31933,7 +32016,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31954,7 +32037,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -31978,7 +32061,7 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32122,7 +32205,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32147,7 +32230,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32172,7 +32255,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32202,7 +32285,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32228,7 +32311,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32409,7 +32492,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32434,7 +32517,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32459,7 +32542,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given (KEYPADINPUT.S.NV) FeatureMap bit mask is set or not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32479,7 +32562,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given (KEYPADINPUT.S.LK) FeatureMap bit mask is set or not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32499,7 +32582,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given (KEYPADINPUT.S.NK) FeatureMap bit mask is set or not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32519,7 +32602,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32545,7 +32628,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32567,7 +32650,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32745,7 +32828,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32770,7 +32853,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32795,7 +32878,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32820,7 +32903,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32846,7 +32929,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CatalogList) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32868,7 +32951,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentApp) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32890,7 +32973,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -32914,7 +32997,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33092,7 +33175,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33117,7 +33200,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33142,7 +33225,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given MEDIAINPUT.S.NU ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33162,7 +33245,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33188,7 +33271,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(InputList) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33210,7 +33293,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentInput) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33232,7 +33315,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33257,7 +33340,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33412,7 +33495,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33437,7 +33520,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33462,7 +33545,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33488,7 +33571,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(MACAddress) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33510,7 +33593,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33535,7 +33618,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33780,7 +33863,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33805,7 +33888,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33830,7 +33913,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given CHANNEL.S.CL ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33850,7 +33933,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given CHANNEL.S.LI ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33870,7 +33953,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33896,7 +33979,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ChannelList): AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33918,7 +34001,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reading optional attribute(Lineup) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33940,7 +34023,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentChannel): AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33962,7 +34045,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(ChangeChannel) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33984,7 +34067,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(ChangeChannelByNumber) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34006,7 +34089,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(SkipChannel) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34028,7 +34111,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34053,7 +34136,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34374,7 +34457,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34399,7 +34482,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34424,7 +34507,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given MEDIAPLAYBACK.S.AS ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34444,7 +34527,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given MEDIAPLAYBACK.S.VS ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34464,7 +34547,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34491,7 +34574,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(StartTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34513,7 +34596,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Duration) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34535,7 +34618,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(SampledPosition) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34557,7 +34640,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(PlaybackSpeed) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34579,7 +34662,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(SeekRangeEnd) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34601,7 +34684,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(SeekRangeStart) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34623,7 +34706,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34647,7 +34730,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(StartOver) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34669,7 +34752,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(Previous) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34691,7 +34774,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(Next) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34713,7 +34796,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(Rewind) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34735,7 +34818,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(FastForward) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34757,7 +34840,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(SkipForward) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34779,7 +34862,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(SkipBackward) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34801,7 +34884,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(Seek) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34823,7 +34906,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34964,7 +35047,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -34989,7 +35072,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35012,7 +35095,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35040,7 +35123,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35062,7 +35145,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35217,7 +35300,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35242,7 +35325,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35267,7 +35350,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35294,7 +35377,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(CurrentTarget) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35316,7 +35399,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35338,7 +35421,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35582,7 +35665,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35607,7 +35690,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35632,7 +35715,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35663,7 +35746,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(VendorName) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35685,7 +35768,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(VendorID) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35707,7 +35790,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ProductID) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35729,7 +35812,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35754,7 +35837,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35966,7 +36049,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35991,7 +36074,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36016,7 +36099,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given CONTENTLAUNCHER.S.CS) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36036,7 +36119,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given CONTENTLAUNCHER.S.UP ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36056,7 +36139,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36082,7 +36165,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(AcceptHeader): AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36104,7 +36187,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(SupportedStreamingProtocols): AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36126,7 +36209,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(LaunchContent) in AcceptedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36148,7 +36231,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional command(LaunchURL) in AcceptedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36170,7 +36253,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36311,7 +36394,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36336,7 +36419,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36361,7 +36444,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36387,7 +36470,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36411,7 +36494,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36528,7 +36611,7 @@ class Test_TC_LOWPOWER_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster sleepWithCompletionHandler:^(NSError * _Nullable err) { + [cluster sleepWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends Sleep command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -36656,18 +36739,18 @@ class Test_TC_KEYPADINPUT_3_2 : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:10U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends CEC Settings Keys(0x0A) to DUT Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends CEC Settings Keys(0x0A) to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -36683,18 +36766,18 @@ class Test_TC_KEYPADINPUT_3_2 : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:9U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends CEC Home Keys(0x09) to DUT Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends CEC Home Keys(0x09) to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -36893,18 +36976,18 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:33U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers1 Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers1 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -36920,18 +37003,18 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:34U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers2 Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers2 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -36947,18 +37030,18 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:35U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers3 Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers3 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -36974,18 +37057,18 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:36U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers4 Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers4 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -37001,18 +37084,18 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:37U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers5 Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers5 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -37028,18 +37111,18 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:38U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers6 Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers6 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -37055,18 +37138,18 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:39U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers7 Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers7 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -37082,18 +37165,18 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:40U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers8 Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers8 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -37109,18 +37192,18 @@ class Test_TC_KEYPADINPUT_3_3 : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:41U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers9 Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers9 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -37231,7 +37314,7 @@ class Test_TC_APPLAUNCHER_3_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCatalogListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CatalogList attribute from the DUT and where each entry in the list is a CSA-issued Vendor Id of type " @"unsigned 16 bit integer ranging between 0-65536 for the catalog Error: %@", err); @@ -37351,7 +37434,7 @@ class Test_TC_APPLAUNCHER_3_6 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentAppWithCompletionHandler:^( + [cluster readAttributeCurrentAppWithCompletion:^( MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads CurrentApp attribute from the DUT and Verify the in-focus application attributes, which should " @"include the display Application ID(type:uint16) Catalog Vendor ID(type:string) or Null if there is no current " @@ -37473,7 +37556,7 @@ class Test_TC_MEDIAINPUT_3_10 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " @"inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " @"InputType (InputType Enums), Name (type: Strings), and Description(Type:String) Error: %@", @@ -37616,7 +37699,7 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " @"inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " @"InputType (InputType Enums), Name (type: Strings), and Description(Type:String) Error: %@", @@ -37641,13 +37724,13 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; params.index = [NSNumber numberWithUnsignedChar:1U]; [cluster selectInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Select Input Command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Select Input Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -37660,7 +37743,7 @@ class Test_TC_MEDIAINPUT_3_11 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read current input list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -37805,7 +37888,7 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " @"inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " @"InputType (InputType Enums), Name (type: Strings), and Description(Type:String) Error: %@", @@ -37827,7 +37910,7 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster showInputStatusWithCompletionHandler:^(NSError * _Nullable err) { + [cluster showInputStatusWithCompletion:^(NSError * _Nullable err) { NSLog(@"Show Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -37846,7 +37929,7 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster hideInputStatusWithCompletionHandler:^(NSError * _Nullable err) { + [cluster hideInputStatusWithCompletion:^(NSError * _Nullable err) { NSLog(@"Hide Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -37984,7 +38067,7 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38007,13 +38090,13 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { params.index = [NSNumber numberWithUnsignedChar:1U]; params.name = @"A1"; [cluster renameInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Rename Input Command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Rename Input Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -38135,7 +38218,7 @@ class Test_TC_CHANNEL_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ChannelList attribute from the DUT to show list of Inputs available and Verify that the response " @"contains a list of the known TV channels. Each list element should consist of the following,Major number " @"(unsigned 16-bit integer, mandatory),Minor number (unsigned 16-bit integer, mandatory),Name (String, " @@ -38290,7 +38373,7 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the ChannelList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38316,13 +38399,13 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { params.minorNumber = mMinornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMinornumber.Value()] : [NSNumber numberWithUnsignedShort:1U]; [cluster changeChannelByNumberWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a ChangeChannelByNumber command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends a ChangeChannelByNumber command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -38345,19 +38428,19 @@ class Test_TC_CHANNEL_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute Error: %@", err); + [cluster + readAttributeCurrentChannelWithCompletion:^(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -38527,16 +38610,15 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeLineupWithCompletionHandler:^(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the Lineup attribute from the DUT to show list of Inputs available and Verify that the response " - @"contains a lineup info object Error: %@", - err); + [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the Lineup attribute from the DUT to show list of Inputs available and Verify that the response " + @"contains a lineup info object Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -38549,7 +38631,7 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38569,19 +38651,19 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + [cluster + readAttributeCurrentChannelWithCompletion:^(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -38597,13 +38679,13 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; params.count = [NSNumber numberWithUnsignedShort:1U]; [cluster skipChannelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a SkipChannel command to the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Sends a SkipChannel command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -38626,23 +38708,23 @@ class Test_TC_CHANNEL_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + [cluster + readAttributeCurrentChannelWithCompletion:^(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); - } - if (value != nil) { + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + } + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentChannel", "ChannelInfo", "ChannelInfo")); - } + VerifyOrReturn(CheckConstraintType("currentChannel", "ChannelInfo", "ChannelInfo")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -38861,8 +38943,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38886,7 +38967,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38910,19 +38991,18 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - playWithCompletionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Play command Error: %@", err); + [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Play command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -38944,7 +39024,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38968,8 +39048,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"sends a Pause command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -39002,7 +39081,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -39026,7 +39105,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopPlaybackWithCompletionHandler:^( + [cluster stopPlaybackWithCompletion:^( MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Sends a Stop command Error: %@", err); @@ -39060,7 +39139,7 @@ class Test_TC_MEDIAPLAYBACK_6_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -39356,8 +39435,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -39381,7 +39459,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -39405,19 +39483,18 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - playWithCompletionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Play command to the DUT Error: %@", err); + [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Play command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -39439,7 +39516,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -39463,19 +39540,19 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster startOverWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a StartOver command to the DUT Error: %@", err); + [cluster + startOverWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a StartOver command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -39497,19 +39574,18 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - nextWithCompletionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Next command to the DUT Error: %@", err); + [cluster nextWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Next command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -39532,19 +39608,19 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster previousWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Previous command to the DUT Error: %@", err); + [cluster + previousWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Previous command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -39571,18 +39647,18 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:10000ULL]; [cluster skipForwardWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a SkipForward command to the DUT Error: %@", err); + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a SkipForward command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -39605,7 +39681,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletionHandler:^( + [cluster readAttributeSampledPositionWithCompletion:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); @@ -39634,18 +39710,18 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:10000ULL]; [cluster skipBackwardWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a SkipBackward command to the DUT Error: %@", err); + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a SkipBackward command to the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -39668,7 +39744,7 @@ class Test_TC_MEDIAPLAYBACK_6_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletionHandler:^( + [cluster readAttributeSampledPositionWithCompletion:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the SampledPosition attribute from the DUT Error: %@", err); @@ -39892,8 +39968,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -39920,18 +39995,18 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; params.position = [NSNumber numberWithUnsignedLongLong:10000ULL]; [cluster seekWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Seek command Error: %@", err); + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Seek command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -39954,7 +40029,7 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletionHandler:^( + [cluster readAttributeSampledPositionWithCompletion:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the SampledPosition attribute Error: %@", err); @@ -40019,18 +40094,18 @@ class Test_TC_MEDIAPLAYBACK_6_3 : public TestCommandBridge { params.position = mSeekPosition.HasValue() ? [NSNumber numberWithUnsignedLongLong:mSeekPosition.Value()] : [NSNumber numberWithUnsignedLongLong:100000000ULL]; [cluster seekWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Seek command Position value beyond the furthest valid position Error: %@", err); + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Seek command Position value beyond the furthest valid position Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 5U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 5U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -40381,8 +40456,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster pauseWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Precondition: Media content in a paused state at the beginning of the content Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40406,7 +40480,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40430,7 +40504,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40454,19 +40528,19 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster fastForwardWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a FastForward command Error: %@", err); + [cluster + fastForwardWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a FastForward command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -40488,7 +40562,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40512,7 +40586,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40536,19 +40610,19 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster fastForwardWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a FastForward command Error: %@", err); + [cluster + fastForwardWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a FastForward command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -40571,7 +40645,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40595,8 +40669,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster rewindWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Sends a Rewind command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40630,7 +40703,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40664,8 +40737,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster rewindWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Sends a Rewind command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40709,19 +40781,18 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - playWithCompletionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a Play command Error: %@", err); + [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a Play command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -40744,7 +40815,7 @@ class Test_TC_MEDIAPLAYBACK_6_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the PlaybackSpeed attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40905,7 +40976,7 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OutputList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40928,13 +40999,13 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; [cluster selectOutputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a SelectAudioOutput command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Sends a SelectAudioOutput command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -40947,7 +41018,7 @@ class Test_TC_AUDIOOUTPUT_7_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentOutputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentOutput attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41093,7 +41164,7 @@ class Test_TC_AUDIOOUTPUT_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the OutputList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41121,13 +41192,13 @@ class Test_TC_AUDIOOUTPUT_7_2 : public TestCommandBridge { params.index = mIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mIndex.Value()] : [NSNumber numberWithUnsignedChar:1U]; params.name = @"CertTest"; [cluster renameOutputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a RenameOutput command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Sends a RenameOutput command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -41279,7 +41350,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentTarget attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41303,7 +41374,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the TargetList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41331,14 +41402,14 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { params.target = mTargetvalue.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue.Value()] : [NSNumber numberWithUnsignedChar:1U]; [cluster navigateTargetWithParams:params - completionHandler:^( - MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a NavigateTarget command Error: %@", err); + completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Sends a NavigateTarget command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -41351,7 +41422,7 @@ class Test_TC_TGTNAV_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the CurrentTarget attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41547,7 +41618,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the VendorName attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41568,7 +41639,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the VendorID attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41588,7 +41659,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the ApplicationName attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41609,7 +41680,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the ProductID attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41632,7 +41703,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationWithCompletionHandler:^( + [cluster readAttributeApplicationWithCompletion:^( MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the Application attribute Error: %@", err); @@ -41653,7 +41724,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the Status attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41675,7 +41746,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationVersionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the ApplicationVersion attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41696,7 +41767,7 @@ class Test_TC_APBSC_9_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAllowedVendorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the AllowedVendorList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41822,7 +41893,7 @@ class Test_TC_CONTENTLAUNCHER_10_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptHeaderWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the AcceptHeader attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -41842,15 +41913,14 @@ class Test_TC_CONTENTLAUNCHER_10_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeSupportedStreamingProtocolsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the SupportedStreamingProtocols attribute from the DUT Error: %@", err); + [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the SupportedStreamingProtocols attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "bitmap32", "bitmap32")); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "bitmap32", "bitmap32")); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -42021,7 +42091,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42046,7 +42116,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42071,7 +42141,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42096,7 +42166,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42126,7 +42196,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the optional attribute(StartUpMode) in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42148,7 +42218,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the optional attribute(OnMode) in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42170,7 +42240,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42192,7 +42262,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42457,13 +42527,13 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { aclArgument = temp_0; } [cluster writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Install ACL for QueryImage Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Install ACL for QueryImage Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -42505,13 +42575,13 @@ class OTA_SuccessfulTransfer : public TestCommandBridge { params.endpoint = mEndpoint.HasValue() ? [NSNumber numberWithUnsignedShort:mEndpoint.Value()] : [NSNumber numberWithUnsignedShort:0U]; [cluster announceOtaProviderWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send an announce OTA provider command to the requestor Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Send an announce OTA provider command to the requestor Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -42661,7 +42731,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42686,7 +42756,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42711,7 +42781,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42740,7 +42810,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42765,7 +42835,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43010,7 +43080,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads mandatory attribute constrains: Occupancy Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43033,7 +43103,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads mandatory attribute constrains: OccupancySensorType Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43056,18 +43126,17 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeOccupancySensorTypeBitmapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); + [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 7U)); + VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 7U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -43080,8 +43149,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePirOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute: PIROccupiedToUnoccupiedDelay Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43104,8 +43172,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePirUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43128,7 +43195,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold Error: %@", err); @@ -43152,20 +43219,20 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); + [cluster + readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("ultrasonicOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("ultrasonicOccupiedToUnoccupiedDelay", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("ultrasonicOccupiedToUnoccupiedDelay", [value unsignedShortValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("ultrasonicOccupiedToUnoccupiedDelay", [value unsignedShortValue], 65535U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -43178,20 +43245,20 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); + [cluster + readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("ultrasonicUnoccupiedToOccupiedDelay", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedDelay", [value unsignedShortValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("ultrasonicUnoccupiedToOccupiedDelay", [value unsignedShortValue], 65535U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -43204,7 +43271,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedThreshold Error: %@", err); @@ -43230,7 +43297,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); @@ -43256,7 +43323,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); @@ -43282,7 +43349,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); @@ -43463,7 +43530,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43486,7 +43553,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43509,7 +43576,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given OO.S.F00(LT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43527,7 +43594,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43552,7 +43619,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the feature dependent(OO.S.F00) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43575,7 +43642,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43597,7 +43664,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the feature dependent(OO.S.F00) commands in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43619,7 +43686,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43781,7 +43848,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43799,7 +43866,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGlobalSceneControlWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read LT attribute: GlobalSceneControl Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43817,7 +43884,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read LT attribute: OnTime Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43838,7 +43905,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOffWaitTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read LT attribute: OffWaitTime Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43859,7 +43926,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read LT attribute: StartUpOnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44199,7 +44266,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44216,7 +44283,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44238,7 +44305,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44255,7 +44322,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44277,7 +44344,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44294,7 +44361,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44316,7 +44383,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44333,7 +44400,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44355,7 +44422,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44372,7 +44439,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44394,7 +44461,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster toggleWithCompletionHandler:^(NSError * _Nullable err) { + [cluster toggleWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send Toggle Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44418,7 +44485,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is true after toggle command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44440,7 +44507,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster toggleWithCompletionHandler:^(NSError * _Nullable err) { + [cluster toggleWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send Toggle Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44464,7 +44531,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after toggle command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44495,7 +44562,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44526,7 +44593,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44548,7 +44615,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Reset Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44565,7 +44632,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44977,7 +45044,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -44997,13 +45064,13 @@ class Test_TC_OO_2_4 : public TestCommandBridge { id startUpOnOffArgument; startUpOnOffArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 0 to StartUpOnOff attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes a value of 0 to StartUpOnOff attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -45037,7 +45104,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45062,13 +45129,13 @@ class Test_TC_OO_2_4 : public TestCommandBridge { id startUpOnOffArgument; startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 1 to StartUpOnOff attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes a value of 1 to StartUpOnOff attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -45102,7 +45169,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45127,13 +45194,13 @@ class Test_TC_OO_2_4 : public TestCommandBridge { id startUpOnOffArgument; startUpOnOffArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 2 to StartUpOnOff attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes a value of 2 to StartUpOnOff attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -45167,7 +45234,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45212,7 +45279,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45237,13 +45304,13 @@ class Test_TC_OO_2_4 : public TestCommandBridge { id startUpOnOffArgument; startUpOnOffArgument = nil; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes NULL to StartUpOnOff attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes NULL to StartUpOnOff attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -45277,7 +45344,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45299,7 +45366,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45339,7 +45406,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the OnOff attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45577,7 +45644,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45602,7 +45669,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45627,7 +45694,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given PS.S.F00(WIRED) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45647,7 +45714,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given PS.S.F01(BAT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45667,7 +45734,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given PS.S.F02(RECHG) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45687,7 +45754,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given PS.S.F03(REPLC) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45707,7 +45774,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45736,7 +45803,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(PS.S.F00-WIRED) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45758,7 +45825,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(PS.S.F01-BAT) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45782,7 +45849,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(PS.S.F02-RECHG) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45805,7 +45872,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(PS.S.F03-REPLC) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45828,7 +45895,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45853,7 +45920,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46309,7 +46376,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads Status attribute from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46332,7 +46399,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOrderWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads Order attribute from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46355,7 +46422,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads Description attribute from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46375,22 +46442,21 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeWiredAssessedInputVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads WiredAssessedInputVoltage attribue from Server DUT Error: %@", err); + [cluster readAttributeWiredAssessedInputVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads WiredAssessedInputVoltage attribue from Server DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("wiredAssessedInputVoltage", "int32u", "int32u")); - VerifyOrReturn(CheckConstraintMinValue("wiredAssessedInputVoltage", [value unsignedIntValue], 0UL)); - VerifyOrReturn( - CheckConstraintMaxValue("wiredAssessedInputVoltage", [value unsignedIntValue], 4294967295UL)); - } + VerifyOrReturn(CheckConstraintType("wiredAssessedInputVoltage", "int32u", "int32u")); + VerifyOrReturn(CheckConstraintMinValue("wiredAssessedInputVoltage", [value unsignedIntValue], 0UL)); + VerifyOrReturn( + CheckConstraintMaxValue("wiredAssessedInputVoltage", [value unsignedIntValue], 4294967295UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -46403,8 +46469,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredAssessedInputFrequencyWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredAssessedInputFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads WiredAssessedInputFrequency attribute from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46431,7 +46496,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredCurrentTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads WiredCurrentType attribute from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46454,7 +46519,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredAssessedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads WiredAssessedCurrent attribute from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46480,7 +46545,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredNominalVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads WiredNominalVoltage from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46503,7 +46568,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredMaximumCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads WiredMaximumCurrent from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46526,7 +46591,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiredPresentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads WiredPresent from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46546,7 +46611,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeActiveWiredFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads ActiveWiredFaults from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46567,7 +46632,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatVoltageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatVoltage from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46593,7 +46658,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatPercentRemainingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatPercentRemaining from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46619,7 +46684,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatTimeRemainingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatTimeRemaining from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46645,7 +46710,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatChargeLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatChargeLevel from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46668,7 +46733,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatReplacementNeededWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatReplacementNeeded from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46688,7 +46753,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatReplaceabilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatReplaceability from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46711,7 +46776,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatPresentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatPresent from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46731,7 +46796,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeActiveBatFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client readsActiveBatFaults from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46752,16 +46817,15 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeBatReplacementDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatReplacementDescription from Server DUT Error: %@", err); + [cluster readAttributeBatReplacementDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatReplacementDescription from Server DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batReplacementDescription", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("batReplacementDescription", value, 60)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("batReplacementDescription", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("batReplacementDescription", value, 60)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -46774,7 +46838,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatCommonDesignationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatCommonDesignation from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46797,7 +46861,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatANSIDesignationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatANSIDesignation from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46818,7 +46882,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatIECDesignationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatIECDesignation from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46839,7 +46903,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatApprovedChemistryWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatApprovedChemistry from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46862,7 +46926,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatCapacity from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46885,7 +46949,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatQuantityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatQuantity from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46908,7 +46972,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatChargeStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatChargeState from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46931,7 +46995,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatTimeToFullChargeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatTimeToFullCharge from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -46957,15 +47021,14 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeBatFunctionalWhileChargingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Test Harness Client reads BatFunctionalWhileCharging from Server DUT Error: %@", err); + [cluster readAttributeBatFunctionalWhileChargingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Test Harness Client reads BatFunctionalWhileCharging from Server DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("batFunctionalWhileCharging", "boolean", "boolean")); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("batFunctionalWhileCharging", "boolean", "boolean")); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -46978,7 +47041,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBatChargingCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads BatChargingCurrent from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47004,7 +47067,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeActiveBatChargeFaultsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Test Harness Client reads ActiveBatChargeFaults from Server DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47224,7 +47287,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47249,7 +47312,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47274,7 +47337,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given PRS.S.F00(EXT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47294,7 +47357,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global mandatory attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47323,7 +47386,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ScaledValue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47345,7 +47408,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(MinScaledValue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47367,7 +47430,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(MaxScaledValue) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47389,7 +47452,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Scale) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47411,7 +47474,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47433,7 +47496,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(ScaledTolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47455,7 +47518,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47480,7 +47543,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47688,7 +47751,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute constraints: MeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47714,7 +47777,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute constraints: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47740,7 +47803,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute constraints: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47766,7 +47829,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Tolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47789,7 +47852,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ScaledValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47815,7 +47878,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinScaledValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47841,7 +47904,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxScaledValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47867,7 +47930,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScaledToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: ScaledTolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -47890,7 +47953,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeScaleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Scale Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48039,7 +48102,7 @@ class Test_TC_PRS_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads from the DUT the MeasuredValue attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48078,7 +48141,7 @@ class Test_TC_PRS_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"After a few seconds, TH reads from the DUT the MeasuredValue attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48413,7 +48476,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48437,7 +48500,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48461,7 +48524,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48493,7 +48556,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48514,7 +48577,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48535,7 +48598,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48556,7 +48619,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48577,7 +48640,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48598,7 +48661,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48619,7 +48682,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48640,7 +48703,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48661,7 +48724,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48682,7 +48745,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48703,7 +48766,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48724,7 +48787,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(Speed) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48745,7 +48808,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48766,7 +48829,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(Power) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48787,7 +48850,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48808,7 +48871,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48829,7 +48892,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the AcceptedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -48853,7 +48916,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the GeneratedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49214,7 +49277,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MaxPressure Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49239,7 +49302,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MaxSpeed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49264,7 +49327,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MaxFlow Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49289,7 +49352,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstPressure Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49314,7 +49377,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstPressure Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49339,7 +49402,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinCompPressure Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49364,7 +49427,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxCompPressureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxCompPressure Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49389,7 +49452,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstSpeed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49414,7 +49477,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstSpeed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49439,7 +49502,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstFlow Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49464,7 +49527,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstFlowWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstFlow Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49489,7 +49552,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MinConstTemp Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49514,7 +49577,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxConstTempWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: MaxConstTemp Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49539,7 +49602,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePumpStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: PumpStatus Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49561,7 +49624,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute: EffectiveOperationMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49583,7 +49646,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49605,7 +49668,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCapacityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute: Capacity Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49630,7 +49693,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Speed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49655,7 +49718,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: LifetimeRunningHours Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49680,7 +49743,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePowerWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Power Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49705,7 +49768,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: LifetimeEnergyConsumed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49730,7 +49793,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute: OperationMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49752,7 +49815,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read optional attribute: ControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49950,13 +50013,13 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { id operationModeArgument; operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH write 0 (Normal) to the OperationMode attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH write 0 (Normal) to the OperationMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -49968,7 +50031,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -49994,13 +50057,13 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { id operationModeArgument; operationModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH write 1 (Minimum) to the OperationMode attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH write 1 (Minimum) to the OperationMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50012,7 +50075,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50037,16 +50100,16 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { id operationModeArgument; operationModeArgument = [NSNumber numberWithUnsignedChar:2U]; - [cluster - writeAttributeOperationModeWithValue:operationModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time. Error: %@", err); + [cluster writeAttributeOperationModeWithValue:operationModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH write 2 (Maximum) to the OperationMode attribute to DUT one at a time. " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50058,7 +50121,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50084,13 +50147,13 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { id operationModeArgument; operationModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH write 3 (Local) to the OperationMode attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH write 3 (Local) to the OperationMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50102,7 +50165,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads from the DUT the EffectiveOperationMode attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50366,13 +50429,13 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { id operationModeArgument; operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 0 to the OperationMode attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write 0 to the OperationMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50384,7 +50447,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveOperationModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveOperationMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50410,13 +50473,13 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 0 to the ControlMode attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write 0 to the ControlMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50428,7 +50491,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50454,13 +50517,13 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the ControlMode attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write 1 to the ControlMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50472,7 +50535,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50498,13 +50561,13 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the ControlMode attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write 2 to the ControlMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50516,7 +50579,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50542,13 +50605,13 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the ControlMode attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write 3 to the ControlMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50560,7 +50623,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50586,13 +50649,13 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 5 to the ControlMode attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write 5 to the ControlMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50604,7 +50667,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50630,13 +50693,13 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { id controlModeArgument; controlModeArgument = [NSNumber numberWithUnsignedChar:7U]; [cluster writeAttributeControlModeWithValue:controlModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 7 to the ControlMode attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write 7 to the ControlMode attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50648,7 +50711,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEffectiveControlModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: EffectiveControlMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50890,13 +50953,13 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { id lifetimeRunningHoursArgument; lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:1UL]; [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the LifetimeRunningHours attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write 1 to the LifetimeRunningHours attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50908,7 +50971,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50935,13 +50998,13 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { id lifetimeRunningHoursArgument; lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:2UL]; [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the LifetimeRunningHours attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write 2 to the LifetimeRunningHours attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50953,7 +51016,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -50980,13 +51043,13 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { id lifetimeRunningHoursArgument; lifetimeRunningHoursArgument = [NSNumber numberWithUnsignedInt:3UL]; [cluster writeAttributeLifetimeRunningHoursWithValue:lifetimeRunningHoursArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the LifetimeRunningHours attribute to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write 3 to the LifetimeRunningHours attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -50998,7 +51061,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeRunningHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeRunningHours Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51024,14 +51087,15 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { id lifetimeEnergyConsumedArgument; lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:1UL]; - [cluster writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 1 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); + [cluster + writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 1 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -51043,7 +51107,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51069,14 +51133,15 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { id lifetimeEnergyConsumedArgument; lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:2UL]; - [cluster writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 2 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); + [cluster + writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 2 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -51088,7 +51153,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51114,14 +51179,15 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { id lifetimeEnergyConsumedArgument; lifetimeEnergyConsumedArgument = [NSNumber numberWithUnsignedInt:3UL]; - [cluster writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write 3 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); + [cluster + writeAttributeLifetimeEnergyConsumedWithValue:lifetimeEnergyConsumedArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write 3 to the LifetimeEnergyConsumed attribute to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -51133,7 +51199,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads the attribute: LifetimeEnergyConsumed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51276,7 +51342,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51300,7 +51366,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51324,7 +51390,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51350,7 +51416,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the AcceptedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51374,7 +51440,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the GeneratedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51493,7 +51559,7 @@ class Test_TC_PSCFG_2_1 : public TestCommandBridge { [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSourcesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the Sources attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51642,7 +51708,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51666,7 +51732,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51690,7 +51756,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51718,7 +51784,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51739,7 +51805,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51763,7 +51829,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51915,7 +51981,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the MinMeasuredValue attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51940,7 +52006,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the MaxMeasuredValue attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51965,7 +52031,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the MeasuredValue attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -51990,7 +52056,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the Tolerance attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52205,7 +52271,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52228,7 +52294,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read FeatureMap attribute and Check values of flags in this FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52251,7 +52317,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given SWTCH.S.F00(LS) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52269,7 +52335,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given SWTCH.S.F01(MS) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52287,7 +52353,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given SWTCH.S.F02(MSR) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52305,7 +52371,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given SWTCH.S.F03(MSL) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52323,7 +52389,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given SWTCH.S.F04(MSM) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52341,7 +52407,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52368,7 +52434,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52394,7 +52460,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52412,7 +52478,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52566,7 +52632,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52590,7 +52656,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52614,7 +52680,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52642,7 +52708,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute(Tolerance) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52663,7 +52729,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read AcceptedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52687,7 +52753,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read GeneratedCommandList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52839,7 +52905,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52864,7 +52930,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52889,7 +52955,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -52914,7 +52980,7 @@ class Test_TC_TMP_2_1 : public TestCommandBridge { [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute: Tolerance Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53249,7 +53315,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53274,7 +53340,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53299,7 +53365,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given TSTAT.S.F00(HEAT ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53319,7 +53385,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given TSTAT.S.F01(COOL) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53339,7 +53405,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given TSTAT.S.F02(OCC) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53359,7 +53425,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given TSTAT.S.F03(SCH) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53379,7 +53445,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given TSTAT.S.F04(SB) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53399,7 +53465,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given TSTAT.S.F05(AUTO) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53419,7 +53485,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53448,7 +53514,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53470,7 +53536,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53492,7 +53558,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53514,7 +53580,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(TSTAT.S.F00(HEAT) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53536,7 +53602,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(TSTAT.S.F01(COOL) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53558,7 +53624,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(TSTAT.S.F05(AUTO)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53582,7 +53648,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(TSTAT.S.F03(SCH)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53606,7 +53672,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(TSTAT.S.F04(SB)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53630,7 +53696,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(TSTAT.S.F04(SB) & TSTAT.S.F02(OCC)) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53654,7 +53720,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53676,7 +53742,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read Feature dependent(TSTAT.S.F03(SCH)) commands in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53701,7 +53767,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53839,7 +53905,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH read ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53863,7 +53929,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53887,7 +53953,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53915,7 +53981,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -53939,7 +54005,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54080,7 +54146,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: TemperatureDisplayMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54102,7 +54168,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the mandatory attribute: KeypadLockout Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54124,18 +54190,17 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("scheduleProgrammingVisibility", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("scheduleProgrammingVisibility", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("scheduleProgrammingVisibility", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("scheduleProgrammingVisibility", [value unsignedCharValue], 1U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -54637,13 +54702,15 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 0 to TemperatureDisplayMode attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog( + @"Writes a value of 0 to TemperatureDisplayMode attribute of DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -54664,7 +54731,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54686,13 +54753,15 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 1 to TemperatureDisplayMode attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog( + @"Writes a value of 1 to TemperatureDisplayMode attribute of DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -54713,7 +54782,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54739,19 +54808,19 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { id temperatureDisplayModeArgument; temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of greater than 1 to TemperatureDisplayMode attribute of " - @"DUT Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of greater than 1 to TemperatureDisplayMode " + @"attribute of DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -54763,7 +54832,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the TemperatureDisplayMode attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54789,13 +54858,13 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 0 to KeypadLockout attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 0 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -54816,7 +54885,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54842,13 +54911,13 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 1 to KeypadLockout attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 1 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -54869,7 +54938,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54895,13 +54964,13 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 2 to KeypadLockout attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 2 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -54922,7 +54991,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -54948,13 +55017,13 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 3 to KeypadLockout attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 3 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -54975,7 +55044,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55001,13 +55070,13 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:4U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 4 to KeypadLockout attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 4 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -55028,7 +55097,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55054,13 +55123,13 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { id keypadLockoutArgument; keypadLockoutArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 5 to KeypadLockout attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 5 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -55081,7 +55150,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55108,16 +55177,18 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { keypadLockoutArgument = [NSNumber numberWithUnsignedChar:6U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of greater than 5 to KeypadLockout attribute of DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog( + @"Writes a value of greater than 5 to KeypadLockout attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -55129,7 +55200,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the KeypadLockout attribute of DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -55155,15 +55226,15 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { id scheduleProgrammingVisibilityArgument; scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 0 to ScheduleProgrammingVisibility attribute of " - @"DUT Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 0 to ScheduleProgrammingVisibility " + @"attribute of DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -55184,19 +55255,18 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("schedule programming visibility", actualValue, 0U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("schedule programming visibility", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -55211,15 +55281,15 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { id scheduleProgrammingVisibilityArgument; scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of 1 to ScheduleProgrammingVisibility attribute of " - @"DUT Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of 1 to ScheduleProgrammingVisibility " + @"attribute of DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -55240,19 +55310,18 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("schedule programming visibility", actualValue, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("schedule programming visibility", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -55267,19 +55336,19 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { id scheduleProgrammingVisibilityArgument; scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes a value of greater than 1 to ScheduleProgrammingVisibility " - @"attribute of DUT Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writes a value of greater than 1 to " + @"ScheduleProgrammingVisibility attribute of DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -55291,19 +55360,18 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ScheduleProgrammingVisibility attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("schedule programming visibility", actualValue, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("schedule programming visibility", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -56005,7 +56073,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56029,7 +56097,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56053,7 +56121,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DGTHREAD.S.F00(PKTCNT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56072,7 +56140,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DGTHREAD.S.F01(ERRCNT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56091,7 +56159,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DGTHREAD.S.F02(MLECNT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56110,7 +56178,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DGTHREAD.S.F03(MACCNT) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56129,7 +56197,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads mandatory attributes in AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56171,7 +56239,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56192,7 +56260,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (DetachedRoleCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56213,7 +56281,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (ChildRoleCount) AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56234,7 +56302,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RouterRoleCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56255,7 +56323,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (LeaderRoleCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56276,7 +56344,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (AttachAttemptCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56297,7 +56365,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (PartitionIdChangeCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56318,7 +56386,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (BetterPartitionAttachAttemptCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56339,7 +56407,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (ParentChangeCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56360,7 +56428,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxTotalCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56381,7 +56449,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxUnicastCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56402,7 +56470,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxBroadcastCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56423,7 +56491,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxAckRequestedCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56444,7 +56512,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxAckedCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56465,7 +56533,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxNoAckRequestedCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56486,7 +56554,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attributes (TxDataCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56507,7 +56575,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxDataPollCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56528,7 +56596,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxBeaconCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56549,7 +56617,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxBeaconRequestCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56570,7 +56638,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxOtherCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56591,7 +56659,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxRetryCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56612,7 +56680,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxDirectMaxRetryExpiryCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56633,7 +56701,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxIndirectMaxRetryExpiryCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56654,7 +56722,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxErrCcaCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56675,7 +56743,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxErrAbortCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56696,7 +56764,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (TxErrBusyChannelCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56717,7 +56785,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxTotalCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56738,7 +56806,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxUnicastCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56759,7 +56827,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxBroadcastCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56780,7 +56848,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxDataCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56801,7 +56869,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxDataPollCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56822,7 +56890,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxBeaconCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56843,7 +56911,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxBeaconRequestCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56864,7 +56932,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxOtherCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56885,7 +56953,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxAddressFilteredCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56906,7 +56974,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxDestAddrFilteredCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56927,7 +56995,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxDuplicatedCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56948,7 +57016,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrNoFrameCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56969,7 +57037,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrUnknownNeighborCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -56990,7 +57058,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrInvalidScrAddrCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57011,7 +57079,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrSecCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57032,7 +57100,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrFcsCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57053,7 +57121,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (RxErrOtherCount) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57074,7 +57142,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute (ActiveTimestamp) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57095,7 +57163,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute (PendingTimestamp) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57116,7 +57184,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the optional attribute (Delay) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57137,7 +57205,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57158,7 +57226,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57302,7 +57370,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57327,7 +57395,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57352,7 +57420,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57379,7 +57447,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57404,7 +57472,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57524,7 +57592,7 @@ class Test_TC_ULABEL_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57672,13 +57740,13 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute from the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -57691,7 +57759,7 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LabelList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -57842,17 +57910,18 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { labelListArgument = temp_0; } - [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + [cluster + writeAttributeLabelListWithValue:labelListArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -57874,17 +57943,18 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { labelListArgument = temp_0; } - [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + [cluster + writeAttributeLabelListWithValue:labelListArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -58039,13 +58109,13 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -58058,7 +58128,7 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58098,13 +58168,13 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -58117,7 +58187,7 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58341,7 +58411,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58365,7 +58435,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58389,7 +58459,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DGWIFI.S.F00(PacketCounts) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58408,7 +58478,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DGWIFI.S.F01(ErrorCounts) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58427,7 +58497,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58457,7 +58527,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58482,7 +58552,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58504,7 +58574,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58525,7 +58595,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58549,7 +58619,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58570,7 +58640,7 @@ class Test_TC_DGWIFI_1_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58821,7 +58891,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBssidWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBssidWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads BSSID attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58844,7 +58914,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSecurityTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads SecurityType attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58867,7 +58937,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWiFiVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads WiFiVersion attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58892,7 +58962,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelNumberWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads ChannelNumber attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58917,7 +58987,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRssiWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRssiWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads RSSI attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58942,7 +59012,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBeaconLostCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads BeaconLostCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58967,7 +59037,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBeaconRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads BeaconRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -58992,7 +59062,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketMulticastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketMulticastRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59017,7 +59087,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketMulticastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketMulticastTxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59042,7 +59112,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketUnicastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketUnicastRxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59067,7 +59137,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketUnicastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketUnicastTxCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59092,7 +59162,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentMaxRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentMaxRate attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59115,7 +59185,7 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads OverrunCount attribute constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59299,7 +59369,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { + [cluster resetCountsWithCompletion:^(NSError * _Nullable err) { NSLog(@"TH sends ResetCounts command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59317,7 +59387,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBeaconLostCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads BeaconLostCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59342,7 +59412,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBeaconRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads BeaconRxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59367,7 +59437,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketMulticastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketMulticastRxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59392,7 +59462,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketMulticastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketMulticastTxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59417,7 +59487,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketUnicastRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketUnicastRxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59442,7 +59512,7 @@ class Test_TC_DGWIFI_2_3 : public TestCommandBridge { [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketUnicastTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads PacketUnicastTxCount attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59759,7 +59829,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads from the DUT the (0xFFFD) ClusterRevision attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59787,7 +59857,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads from the DUT the (0xFFFC) FeatureMap attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59812,7 +59882,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given WNCV.S.F00(LF) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59832,7 +59902,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given WNCV.S.F01(TL) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59852,7 +59922,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given WNCV.S.F02(PA_LF) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59872,7 +59942,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given WNCV.S.F03(ABS) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59892,7 +59962,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given WNCV.S.F04(PA_TL) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59912,7 +59982,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads from the DUT the (0xFFFB) AttributeList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59943,7 +60013,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(SafetyStatus) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59965,7 +60035,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & WNCV.S.F03) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -59988,7 +60058,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60011,7 +60081,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60034,7 +60104,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60057,7 +60127,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60081,7 +60151,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60103,7 +60173,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60125,7 +60195,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60147,7 +60217,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60519,7 +60589,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"1a: read the RO mandatory attribute default: Type Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60542,7 +60612,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"1b: read the RO mandatory attribute default: ConfigStatus Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60565,7 +60635,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"1c: read the RO mandatory attribute default: OperationalStatus Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60588,7 +60658,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEndProductTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"1d: read the RO mandatory attribute default: EndProductType Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60611,7 +60681,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"1e: read the RW mandatory attribute default: Mode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60637,13 +60707,13 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"1f: write a value into the RW mandatory attribute:: Mode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"1f: write a value into the RW mandatory attribute:: Mode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -60656,8 +60726,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2a: read the RO optional attribute default: TargetPositionLiftPercent100ths Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60685,8 +60754,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2b: read the RO optional attribute default: TargetPositionTiltPercent100ths Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60714,23 +60782,23 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2c: read the RO optional attribute default: CurrentPositionLiftPercent100ths Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2c: read the RO optional attribute default: CurrentPositionLiftPercent100ths Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -60743,23 +60811,23 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"2d: read the RO optional attribute default: CurrentPositionTiltPercent100ths Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"2d: read the RO optional attribute default: CurrentPositionTiltPercent100ths Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -60772,7 +60840,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInstalledOpenLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2e: read the RO optional attribute default: InstalledOpenLimitLift Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60795,7 +60863,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInstalledClosedLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2f: read the RO optional attribute default: InstalledClosedLimitLift Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60818,7 +60886,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInstalledOpenLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2g: read the RO optional attribute default: InstalledOpenLimitTilt Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60841,7 +60909,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInstalledClosedLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2h: read the RO optional attribute default: InstalledClosedLimitTilt Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60864,7 +60932,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSafetyStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3a: read the RO mandatory attribute default: SafetyStatus Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60887,7 +60955,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalClosedLimitLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3b: read the RO optional attribute default: PhysicalClosedLimitLift Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60910,7 +60978,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePhysicalClosedLimitTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3c: read the RO optional attribute default: PhysicalClosedLimitTilt Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60933,7 +61001,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3d: read the RO optional attribute default: CurrentPositionLift Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60959,7 +61027,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3e: read the RO optional attribute default: CurrentPositionTilt Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -60985,7 +61053,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfActuationsLiftWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3f: read the RO optional attribute default: NumberOfActuationsLift Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61008,7 +61076,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfActuationsTiltWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3g: read the RO optional attribute default: NumberOfActuationsTilt Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61031,23 +61099,22 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3h: read the RO optional attribute default: CurrentPositionLiftPercentage Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3h: read the RO optional attribute default: CurrentPositionLiftPercentage Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -61060,23 +61127,22 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3i:read the RO optional attribute default: CurrentPositionTiltPercentage Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3i:read the RO optional attribute default: CurrentPositionTiltPercentage Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -61470,13 +61536,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeModeWithValue:modeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"1a: TH set the Mode Attribute bit0 of the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"1a: TH set the Mode Attribute bit0 of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -61489,7 +61555,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"1b: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61514,13 +61580,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"1c: TH clear the Mode Attribute bit0 of the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"1c: TH clear the Mode Attribute bit0 of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -61533,7 +61599,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"1d: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61558,13 +61624,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeModeWithValue:modeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"2a: TH set the Mode Attribute bit1 of the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"2a: TH set the Mode Attribute bit1 of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -61578,7 +61644,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2b: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61603,7 +61669,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { NSLog(@"2c: If (ConfigStatus bit0 == 0) TH send DownOrClose command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -61626,13 +61692,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"2d: TH clear the Mode Attribute bit1 of the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"2d: TH clear the Mode Attribute bit1 of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -61645,7 +61711,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2e: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61667,7 +61733,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2f: TH reads the Mode Attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61689,7 +61755,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { NSLog(@"2g: TH send DownOrClose command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61711,13 +61777,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:4U]; [cluster writeAttributeModeWithValue:modeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: TH set the Mode Attribute bit2 of the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"3a: TH set the Mode Attribute bit2 of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -61730,7 +61796,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { NSLog(@"3b: TH send DownOrClose command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -61751,7 +61817,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3c: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61779,13 +61845,13 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { id modeArgument; modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3d: TH clear the Mode Attribute bit2 of the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"3d: TH clear the Mode Attribute bit2 of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -61798,7 +61864,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { NSLog(@"3e: TH send DownOrClose command to the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -61817,7 +61883,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeConfigStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3f: TH reads ConfigStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62038,7 +62104,7 @@ class Test_TC_WNCV_2_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEndProductTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads EndProductType attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62451,7 +62517,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62477,23 +62543,23 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -62506,23 +62572,22 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -62535,23 +62600,23 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -62564,23 +62629,22 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -62649,7 +62713,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletionHandler:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { NSLog(@"2a: TH sends UpOrOpen command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62675,8 +62739,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62701,8 +62764,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62734,7 +62796,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3a: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62754,7 +62816,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62774,7 +62836,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62794,7 +62856,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62814,7 +62876,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62841,23 +62903,23 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -62870,23 +62932,22 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -62899,23 +62960,23 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -62928,23 +62989,22 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -62957,7 +63017,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopMotionWithCompletionHandler:^(NSError * _Nullable err) { + [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { NSLog(@"4a: TH sends a StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -62983,7 +63043,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63014,8 +63074,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63043,8 +63102,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63462,7 +63520,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletionHandler:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { NSLog(@"1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63488,23 +63546,23 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 9999U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -63517,23 +63575,22 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -63546,23 +63603,23 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1e: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 9999U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -63575,23 +63632,22 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1f: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -63660,7 +63716,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { NSLog(@"2a: TH sends DownOrClose command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63686,8 +63742,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63712,8 +63767,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2d: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63745,7 +63799,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3a: TH reads OperationalStatus attribute's bit 0..1 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63765,7 +63819,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63785,7 +63839,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3a: TH reads OperationalStatus attribute's bit 2..3 (WNCV.S.F00(LF)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63805,7 +63859,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63825,7 +63879,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3a: TH reads OperationalStatus attribute's bit 4..5 (WNCV.S.F01(TL)) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63852,23 +63906,23 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -63881,23 +63935,22 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -63910,23 +63963,23 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercent100ths", "Percent100ths", "Percent100ths")); + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -63939,23 +63992,22 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3e: If (PA & LF) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); - } + VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "Percent", "Percent")); + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -63968,7 +64020,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopMotionWithCompletionHandler:^(NSError * _Nullable err) { + [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { NSLog(@"4a: TH sends a StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -63994,7 +64046,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64025,8 +64077,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64054,8 +64105,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"5c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64336,7 +64386,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64362,7 +64412,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletionHandler:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { NSLog(@"1c: TH sends UpOrOpen command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64388,7 +64438,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"1e: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64472,7 +64522,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopMotionWithCompletionHandler:^(NSError * _Nullable err) { + [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { NSLog(@"2a: TH sends a StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64498,7 +64548,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2c: TH reads OperationalStatus attribute from DUT after a StopMotion Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64529,7 +64579,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2e: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64554,25 +64604,25 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } - { - attrCurrentPositionLift = value; - } + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } + { + attrCurrentPositionLift = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -64586,8 +64636,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute 3c: it Must be equal with " @"CurrentPositionLiftPercent100ths from DUT Error: %@", err); @@ -64619,25 +64668,25 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"4a: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"4a: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } - { - attrCurrentPositionTilt = value; - } + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } + { + attrCurrentPositionTilt = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -64651,8 +64700,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"4b: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute 4c: it Must be equal with " @"CurrentPositionTiltPercent100ths from DUT Error: %@", err); @@ -64869,7 +64917,7 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64895,7 +64943,7 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletionHandler:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { NSLog(@"2a: TH sends UpOrOpen command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64921,7 +64969,7 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2c: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -64945,42 +64993,16 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 0U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 0U)); } NextTest(); @@ -64989,7 +65011,7 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() + CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -64997,16 +65019,15 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 0U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 0U)); } NextTest(); @@ -65015,7 +65036,7 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() + CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -65024,15 +65045,15 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 0U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 0U)); } NextTest(); @@ -65040,6 +65061,31 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_WNCV_3_5 : public TestCommandBridge { @@ -65235,7 +65281,7 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletionHandler:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { NSLog(@"1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65261,7 +65307,7 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { NSLog(@"2a: TH sends DownOrClose command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65287,7 +65333,7 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2c: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65311,42 +65357,16 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 10000U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(1) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 100U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 10000U)); } NextTest(); @@ -65355,7 +65375,7 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() + CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -65363,16 +65383,15 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 10000U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 100U)); } NextTest(); @@ -65381,7 +65400,7 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() + CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -65390,15 +65409,15 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 100U)); + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 10000U)); } NextTest(); @@ -65406,6 +65425,31 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(1) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 100U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_WNCV_4_1 : public TestCommandBridge { @@ -65676,7 +65720,7 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65702,18 +65746,18 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - } - VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", value, 0U)); + if (value != nil) { + } + VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", value, 0U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -65729,13 +65773,13 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:2500U]; [cluster goToLiftPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"2a: TH sends GoToLiftPercentage command with 25 percent to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"2a: TH sends GoToLiftPercentage command with 25 percent to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -65755,8 +65799,7 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65788,7 +65831,7 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3b: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65812,20 +65855,20 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 2500U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 2500U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -65838,20 +65881,19 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 25U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 25U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -65867,13 +65909,13 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:7520U]; [cluster goToLiftPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToLiftPercentage command with 75.20 percent to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"4a: TH sends GoToLiftPercentage command with 75.20 percent to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -65893,8 +65935,7 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"4c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65926,7 +65967,7 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"5b: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -65950,20 +65991,20 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 7520U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercent100ths", actualValue, 7520U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -65976,20 +66017,19 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5d: If (PA & LF) TH reads CurrentPositionLiftPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 75U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 75U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66263,7 +66303,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster downOrCloseWithCompletionHandler:^(NSError * _Nullable err) { + [cluster downOrCloseWithCompletion:^(NSError * _Nullable err) { NSLog(@"1a: TH sends DownOrClose command to preposition the DUT in the opposite direction Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -66289,18 +66329,18 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - } - VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", value, 0U)); + if (value != nil) { + } + VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", value, 0U)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66316,13 +66356,13 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:3000U]; [cluster goToTiltPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"2a: TH sends GoToTiltPercentage command with 30 percent to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"2a: TH sends GoToTiltPercentage command with 30 percent to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66342,8 +66382,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"2c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -66375,7 +66414,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"3b: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -66399,20 +66438,20 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 3000U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 3000U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66425,20 +66464,19 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 30U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 30U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66454,13 +66492,13 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:6005U]; [cluster goToTiltPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"4a: TH sends GoToTiltPercentage command with 60.05 percent to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66480,8 +66518,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"4c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -66513,7 +66550,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOperationalStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"5b: TH reads OperationalStatus attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -66537,20 +66574,20 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 6005U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercent100ths", actualValue, 6005U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66563,20 +66600,19 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"5d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"5d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 60U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 60U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66732,25 +66768,25 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1a: If (PA_LF & LF) TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1a: If (PA_LF & LF) TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); - } - { - attrCurrentPositionLiftPercent100ths = value; - } + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionLiftPercent100ths", [value unsignedShortValue], 10000U)); + } + { + attrCurrentPositionLiftPercent100ths = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66764,30 +66800,29 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionLiftPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1b 1c: If (PA_LF & LF) TH reads CurrentPositionLiftPercentage from DUT + assert " - @"CurrentPositionLiftPercent100ths/100 equals CurrentPositionLiftPercentage Error: %@", - err); + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1b 1c: If (PA_LF & LF) TH reads CurrentPositionLiftPercentage from DUT + assert " + @"CurrentPositionLiftPercent100ths/100 equals CurrentPositionLiftPercentage Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, - [attrCurrentPositionLiftPercent100ths unsignedShortValue] / 100U)); - } - if (value != nil) { + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, + [attrCurrentPositionLiftPercent100ths unsignedShortValue] / 100U)); + } + if (value != nil) { - VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); - } + VerifyOrReturn( + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66802,17 +66837,17 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:12288U]; - [cluster - goToLiftPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"2b: TH sends GoToLiftPercentage command with BadParam to DUT Error: %@", err); + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"2b: TH sends GoToLiftPercentage command with BadParam to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66827,17 +66862,17 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:10001U]; - [cluster - goToLiftPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: TH sends GoToLiftPercentage command with 10001 to DUT Error: %@", err); + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"3a: TH sends GoToLiftPercentage command with 10001 to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -66852,17 +66887,17 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:65535U]; - [cluster - goToLiftPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToLiftPercentage command with 0xFFFF to DUT Error: %@", err); + [cluster goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"4a: TH sends GoToLiftPercentage command with 0xFFFF to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67018,25 +67053,25 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1a: If (PA_TL & TL) TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1a: If (PA_TL & TL) TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue( - "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); - } - { - attrCurrentPositionTiltPercent100ths = value; - } + VerifyOrReturn(CheckConstraintMinValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue( + "currentPositionTiltPercent100ths", [value unsignedShortValue], 10000U)); + } + { + attrCurrentPositionTiltPercent100ths = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67050,30 +67085,29 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeCurrentPositionTiltPercentageWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"1b 1c: If (PA_LF & LF) TH reads CurrentPositionTiltPercentage from DUT + assert " - @"CurrentPositionTiltPercent100ths/100 equals CurrentPositionTiltPercentage Error: %@", - err); + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"1b 1c: If (PA_LF & LF) TH reads CurrentPositionTiltPercentage from DUT + assert " + @"CurrentPositionTiltPercent100ths/100 equals CurrentPositionTiltPercentage Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, - [attrCurrentPositionTiltPercent100ths unsignedShortValue] / 100U)); - } - if (value != nil) { + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, + [attrCurrentPositionTiltPercent100ths unsignedShortValue] / 100U)); + } + if (value != nil) { - VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); - VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); - } + VerifyOrReturn( + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67088,17 +67122,17 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:12288U]; - [cluster - goToTiltPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"2b: TH sends GoToTiltPercentage command with BadParam to DUT Error: %@", err); + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"2b: TH sends GoToTiltPercentage command with BadParam to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67113,17 +67147,17 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:10001U]; - [cluster - goToTiltPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: TH sends GoToTiltPercentage command with 10001 to DUT Error: %@", err); + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"3a: TH sends GoToTiltPercentage command with 10001 to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67138,17 +67172,17 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:65535U]; - [cluster - goToTiltPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"4a: TH sends GoToTiltPercentage command with 0xFFFF to DUT Error: %@", err); + [cluster goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"4a: TH sends GoToTiltPercentage command with 0xFFFF to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67399,7 +67433,7 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster upOrOpenWithCompletionHandler:^(NSError * _Nullable err) { + [cluster upOrOpenWithCompletion:^(NSError * _Nullable err) { NSLog(@"0b: TH sends UpOrOpen command to preposition the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -67420,14 +67454,15 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:9000U]; - [cluster goToLiftPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"1a: If (PA_LF & LF) TH sends GoToLiftPercentage command with 90%% to DUT Error: %@", err); + [cluster + goToLiftPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"1a: If (PA_LF & LF) TH sends GoToLiftPercentage command with 90%% to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67447,7 +67482,7 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopMotionWithCompletionHandler:^(NSError * _Nullable err) { + [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { NSLog(@"1c: TH sends StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -67475,14 +67510,15 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:9000U]; - [cluster goToTiltPercentageWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"2a: If (PA_TL & TL) TH sends GoToTiltPercentage command with 90%% to DUT Error: %@", err); + [cluster + goToTiltPercentageWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"2a: If (PA_TL & TL) TH sends GoToTiltPercentage command with 90%% to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67502,7 +67538,7 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopMotionWithCompletionHandler:^(NSError * _Nullable err) { + [cluster stopMotionWithCompletion:^(NSError * _Nullable err) { NSLog(@"2c: TH sends StopMotion command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -67529,21 +67565,21 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3a: TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3a: TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - } - VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", value, 0U)); - { - attrCurrentPositionLiftPercent100ths = value; - } + if (value != nil) { + } + VerifyOrReturn(CheckConstraintNotValue("currentPositionLiftPercent100ths", value, 0U)); + { + attrCurrentPositionLiftPercent100ths = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67557,21 +67593,21 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3b: TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3b: TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - } - VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", value, 0U)); - { - attrCurrentPositionTiltPercent100ths = value; - } + if (value != nil) { + } + VerifyOrReturn(CheckConstraintNotValue("currentPositionTiltPercent100ths", value, 0U)); + { + attrCurrentPositionTiltPercent100ths = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67607,25 +67643,25 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3e: TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3e: TH reads CurrentPositionLiftPercent100ths from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - if (attrCurrentPositionLiftPercent100ths == nil) { - VerifyOrReturn(CheckValueNull("CurrentPositionLiftPercent100ths", actualValue)); - } else { - VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); - VerifyOrReturn( - CheckValue("CurrentPositionLiftPercent100ths", actualValue, attrCurrentPositionLiftPercent100ths)); + { + id actualValue = value; + if (attrCurrentPositionLiftPercent100ths == nil) { + VerifyOrReturn(CheckValueNull("CurrentPositionLiftPercent100ths", actualValue)); + } else { + VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercent100ths", actualValue)); + VerifyOrReturn( + CheckValue("CurrentPositionLiftPercent100ths", actualValue, attrCurrentPositionLiftPercent100ths)); + } } - } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67638,25 +67674,25 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"3f: TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"3f: TH reads CurrentPositionTiltPercent100ths from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - if (attrCurrentPositionTiltPercent100ths == nil) { - VerifyOrReturn(CheckValueNull("CurrentPositionTiltPercent100ths", actualValue)); - } else { - VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); - VerifyOrReturn( - CheckValue("CurrentPositionTiltPercent100ths", actualValue, attrCurrentPositionTiltPercent100ths)); + { + id actualValue = value; + if (attrCurrentPositionTiltPercent100ths == nil) { + VerifyOrReturn(CheckValueNull("CurrentPositionTiltPercent100ths", actualValue)); + } else { + VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercent100ths", actualValue)); + VerifyOrReturn( + CheckValue("CurrentPositionTiltPercent100ths", actualValue, attrCurrentPositionTiltPercent100ths)); + } } - } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67774,7 +67810,7 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Target Navigator list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -67804,7 +67840,7 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute current navigator target Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -67832,24 +67868,24 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { params.target = [NSNumber numberWithUnsignedChar:1U]; params.data = @"1"; [cluster navigateTargetWithParams:params - completionHandler:^( - MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Navigate Target Request Command Error: %@", err); + completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Navigate Target Request Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -67981,7 +68017,7 @@ class TV_AudioOutputCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Audio Output list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68014,7 +68050,7 @@ class TV_AudioOutputCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentOutputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute current audio output Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68041,13 +68077,13 @@ class TV_AudioOutputCluster : public TestCommandBridge { __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; params.index = [NSNumber numberWithUnsignedChar:1U]; [cluster selectOutputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Select Output Command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Select Output Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -68064,13 +68100,13 @@ class TV_AudioOutputCluster : public TestCommandBridge { params.index = [NSNumber numberWithUnsignedChar:1U]; params.name = @"HDMI Test"; [cluster renameOutputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Rename Output Command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Rename Output Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -68083,7 +68119,7 @@ class TV_AudioOutputCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Audio Output list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68235,7 +68271,7 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCatalogListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Application Launcher list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68261,7 +68297,7 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentAppWithCompletionHandler:^( + [cluster readAttributeCurrentAppWithCompletion:^( MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application launcher app Error: %@", err); @@ -68294,23 +68330,24 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { params.data = [[NSData alloc] initWithBytes:"data" length:4]; [cluster launchAppWithParams:params - completionHandler:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch App Command Error: %@", err); + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Launch App Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); - } + { + id actualValue = values.data; + VerifyOrReturn( + CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -68330,23 +68367,23 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { [cluster stopAppWithParams:params - completionHandler:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Stop App Command Error: %@", err); + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Stop App Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -68366,23 +68403,23 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { [cluster hideAppWithParams:params - completionHandler:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Hide App Command Error: %@", err); + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Hide App Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"data" length:4])); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -68489,18 +68526,18 @@ class TV_KeypadInputCluster : public TestCommandBridge { __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; params.keyCode = [NSNumber numberWithUnsignedChar:3U]; [cluster sendKeyWithParams:params - completionHandler:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Key Command Error: %@", err); + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Key Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -68622,18 +68659,18 @@ class TV_AccountLoginCluster : public TestCommandBridge { params.tempAccountIdentifier = @"asdf"; [cluster getSetupPINWithParams:params - completionHandler:^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Setup PIN Command Error: %@", err); + completion:^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Get Setup PIN Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.setupPIN; - VerifyOrReturn(CheckValueAsString("setupPIN", actualValue, @"tempPin123")); - } + { + id actualValue = values.setupPIN; + VerifyOrReturn(CheckValueAsString("setupPIN", actualValue, @"tempPin123")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -68650,13 +68687,13 @@ class TV_AccountLoginCluster : public TestCommandBridge { params.tempAccountIdentifier = @"asdf"; params.setupPIN = @"tempPin123"; [cluster loginWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Login Command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Login Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -68669,7 +68706,7 @@ class TV_AccountLoginCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster logoutWithCompletionHandler:^(NSError * _Nullable err) { + [cluster logoutWithCompletion:^(NSError * _Nullable err) { NSLog(@"Logout Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68779,7 +68816,7 @@ class TV_WakeOnLanCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMACAddressWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read mac address Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68943,7 +68980,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor name Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68967,7 +69004,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor id Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -68991,7 +69028,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application name Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69015,7 +69052,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute product id Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69039,7 +69076,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application status Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69063,7 +69100,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationWithCompletionHandler:^( + [cluster readAttributeApplicationWithCompletion:^( MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application status Error: %@", err); @@ -69091,7 +69128,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationVersionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application version Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69115,7 +69152,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAllowedVendorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute application allowed vendor list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69372,7 +69409,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute playback state Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69396,7 +69433,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute start time Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69421,7 +69458,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDurationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute duration Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69446,7 +69483,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletionHandler:^( + [cluster readAttributeSampledPositionWithCompletion:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position Error: %@", err); @@ -69474,7 +69511,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePlaybackSpeedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute playback speed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69498,7 +69535,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSeekRangeEndWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute seek range end Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69523,7 +69560,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSeekRangeStartWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute seek range start Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69548,39 +69585,8 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - playWithCompletionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Play Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } - - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestMediaPlaybackPauseCommand_9() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster pauseWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Pause Command Error: %@", err); + [cluster playWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Play Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69600,7 +69606,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackStopCommand_10() + CHIP_ERROR TestMediaPlaybackPauseCommand_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -69608,9 +69614,8 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster stopPlaybackWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Stop Command Error: %@", err); + [cluster pauseWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Pause Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69630,7 +69635,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackStartOverCommand_11() + CHIP_ERROR TestMediaPlaybackStopCommand_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -69638,9 +69643,9 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster startOverWithCompletionHandler:^( + [cluster stopPlaybackWithCompletion:^( MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Start Over Command Error: %@", err); + NSLog(@"Media Playback Stop Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69660,7 +69665,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackPreviousCommand_12() + CHIP_ERROR TestMediaPlaybackStartOverCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -69668,29 +69673,29 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster previousWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Previous Command Error: %@", err); + [cluster + startOverWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Start Over Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackNextCommand_13() + CHIP_ERROR TestMediaPlaybackPreviousCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -69699,8 +69704,8 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster - nextWithCompletionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Next Command Error: %@", err); + previousWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Previous Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69720,7 +69725,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackRewindCommand_14() + CHIP_ERROR TestMediaPlaybackNextCommand_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -69728,9 +69733,8 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster rewindWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Rewind Command Error: %@", err); + [cluster nextWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Next Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69750,7 +69754,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMediaPlaybackFastForwardCommand_15() + CHIP_ERROR TestMediaPlaybackRewindCommand_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device @@ -69758,9 +69762,8 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster fastForwardWithCompletionHandler:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Fast Forward Command Error: %@", err); + [cluster rewindWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Rewind Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -69780,6 +69783,36 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestMediaPlaybackFastForwardCommand_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterMediaPlayback * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(3) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + fastForwardWithCompletion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Fast Forward Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + CHIP_ERROR TestMediaPlaybackSkipForwardCommand_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -69792,23 +69825,23 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:500ULL]; [cluster skipForwardWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Skip Forward Command Error: %@", err); + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Skip Forward Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -69821,7 +69854,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletionHandler:^( + [cluster readAttributeSampledPositionWithCompletion:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position after skip forward Error: %@", err); @@ -69853,23 +69886,23 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:100ULL]; [cluster skipBackwardWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Skip Backward Command Error: %@", err); + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Skip Backward Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -69882,7 +69915,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletionHandler:^( + [cluster readAttributeSampledPositionWithCompletion:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position after skip backward Error: %@", err); @@ -69913,23 +69946,23 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; params.position = [NSNumber numberWithUnsignedLongLong:1000ULL]; [cluster seekWithParams:params - completionHandler:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Media Playback Seek Command Error: %@", err); + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Media Playback Seek Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -69942,7 +69975,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSampledPositionWithCompletionHandler:^( + [cluster readAttributeSampledPositionWithCompletion:^( MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute position after seek Error: %@", err); @@ -70096,7 +70129,7 @@ class TV_ChannelCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Channel list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -70149,26 +70182,25 @@ class TV_ChannelCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeLineupWithCompletionHandler:^(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute channel lineup Error: %@", err); + [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute channel lineup Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("Lineup", actualValue)); - VerifyOrReturn( - CheckValueAsString("operatorName", ((MTRChannelClusterLineupInfo *) actualValue).operatorName, @"Comcast")); - VerifyOrReturn(CheckValueAsString( - "lineupName", ((MTRChannelClusterLineupInfo *) actualValue).lineupName, @"Comcast King County")); - VerifyOrReturn( - CheckValueAsString("postalCode", ((MTRChannelClusterLineupInfo *) actualValue).postalCode, @"98052")); - VerifyOrReturn(CheckValue("lineupInfoType", ((MTRChannelClusterLineupInfo *) actualValue).lineupInfoType, 0U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("Lineup", actualValue)); + VerifyOrReturn( + CheckValueAsString("operatorName", ((MTRChannelClusterLineupInfo *) actualValue).operatorName, @"Comcast")); + VerifyOrReturn(CheckValueAsString( + "lineupName", ((MTRChannelClusterLineupInfo *) actualValue).lineupName, @"Comcast King County")); + VerifyOrReturn( + CheckValueAsString("postalCode", ((MTRChannelClusterLineupInfo *) actualValue).postalCode, @"98052")); + VerifyOrReturn(CheckValue("lineupInfoType", ((MTRChannelClusterLineupInfo *) actualValue).lineupInfoType, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -70181,7 +70213,7 @@ class TV_ChannelCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( + [cluster readAttributeCurrentChannelWithCompletion:^( MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute current channel Error: %@", err); @@ -70216,23 +70248,23 @@ class TV_ChannelCluster : public TestCommandBridge { params.match = @"PBS"; [cluster changeChannelWithParams:params - completionHandler:^(MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Change Channel Command Error: %@", err); + completion:^(MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Change Channel Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, @"data response")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -70249,13 +70281,13 @@ class TV_ChannelCluster : public TestCommandBridge { params.majorNumber = [NSNumber numberWithUnsignedShort:6U]; params.minorNumber = [NSNumber numberWithUnsignedShort:0U]; [cluster changeChannelByNumberWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change Channel By Number Command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Change Channel By Number Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -70271,13 +70303,13 @@ class TV_ChannelCluster : public TestCommandBridge { __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; params.count = [NSNumber numberWithUnsignedShort:1U]; [cluster skipChannelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Skip Channel Command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Skip Channel Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -70381,7 +70413,7 @@ class TV_LowPowerCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster sleepWithCompletionHandler:^(NSError * _Nullable err) { + [cluster sleepWithCompletion:^(NSError * _Nullable err) { NSLog(@"Sleep Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -70512,7 +70544,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptHeaderWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute accept header list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -70538,19 +70570,18 @@ class TV_ContentLauncherCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeSupportedStreamingProtocolsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute supported streaming protocols Error: %@", err); + [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute supported streaming protocols Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("SupportedStreamingProtocols", actualValue, 0UL)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("SupportedStreamingProtocols", actualValue, 0UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -70586,23 +70617,23 @@ class TV_ContentLauncherCluster : public TestCommandBridge { params.data = @"exampleData"; [cluster launchContentWithParams:params - completionHandler:^(MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch Content Command Error: %@", err); + completion:^(MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Launch Content Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"exampleData")); - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, @"exampleData")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -70786,23 +70817,23 @@ class TV_ContentLauncherCluster : public TestCommandBridge { = [NSNumber numberWithUnsignedChar:0U]; [cluster launchURLWithParams:params - completionHandler:^(MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch URL Command Error: %@", err); + completion:^(MTRContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Launch URL Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, @"exampleData")); - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, @"exampleData")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -70948,7 +70979,7 @@ class TV_MediaInputCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute media input list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -70982,7 +71013,7 @@ class TV_MediaInputCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read current media input Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -71009,13 +71040,13 @@ class TV_MediaInputCluster : public TestCommandBridge { __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; params.index = [NSNumber numberWithUnsignedChar:1U]; [cluster selectInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Select Input Command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Select Input Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -71028,7 +71059,7 @@ class TV_MediaInputCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster hideInputStatusWithCompletionHandler:^(NSError * _Nullable err) { + [cluster hideInputStatusWithCompletion:^(NSError * _Nullable err) { NSLog(@"Hide Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -71047,7 +71078,7 @@ class TV_MediaInputCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster showInputStatusWithCompletionHandler:^(NSError * _Nullable err) { + [cluster showInputStatusWithCompletion:^(NSError * _Nullable err) { NSLog(@"Show Input Status Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -71070,13 +71101,13 @@ class TV_MediaInputCluster : public TestCommandBridge { params.index = [NSNumber numberWithUnsignedChar:1U]; params.name = @"HDMI Test"; [cluster renameInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Rename Input Command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Rename Input Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -71089,7 +71120,7 @@ class TV_MediaInputCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute media input list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -71247,7 +71278,7 @@ class TestCASERecovery : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read an attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -71284,7 +71315,7 @@ class TestCASERecovery : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read an attribute again Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -71311,7 +71342,7 @@ class TestCASERecovery : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read an attribute a third time Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -74948,7 +74979,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster testWithCompletionHandler:^(NSError * _Nullable err) { + [cluster testWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send Test Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -74967,7 +74998,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster testNotHandledWithCompletionHandler:^(NSError * _Nullable err) { + [cluster testNotHandledWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send Test Not Handled Command Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -74987,7 +75018,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster testSpecificWithCompletionHandler:^( + [cluster testSpecificWithCompletion:^( MTRTestClusterClusterTestSpecificResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Send Test Specific Command Error: %@", err); @@ -75016,19 +75047,19 @@ class TestCluster : public TestCommandBridge { params.arg1 = [NSNumber numberWithUnsignedChar:3U]; params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Add Arguments Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); - } + { + id actualValue = values.returnValue; + VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75044,18 +75075,18 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; params.arg1 = [NSNumber numberWithUnsignedChar:250U]; params.arg2 = [NSNumber numberWithUnsignedChar:6U]; - [cluster - testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send failing Test Add Arguments Command Error: %@", err); + [cluster testAddArgumentsWithParams:params + completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send failing Test Add Arguments Command Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75068,7 +75099,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75095,13 +75126,13 @@ class TestCluster : public TestCommandBridge { id booleanArgument; booleanArgument = [NSNumber numberWithBool:1]; [cluster writeAttributeBooleanWithValue:booleanArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BOOLEAN True Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BOOLEAN True Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75114,7 +75145,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN True Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75141,13 +75172,13 @@ class TestCluster : public TestCommandBridge { id booleanArgument; booleanArgument = [NSNumber numberWithBool:0]; [cluster writeAttributeBooleanWithValue:booleanArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BOOLEAN False Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BOOLEAN False Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75160,7 +75191,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN False Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75184,7 +75215,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75211,13 +75242,13 @@ class TestCluster : public TestCommandBridge { id bitmap8Argument; bitmap8Argument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP8 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP8 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75230,7 +75261,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75257,13 +75288,13 @@ class TestCluster : public TestCommandBridge { id bitmap8Argument; bitmap8Argument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP8 Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP8 Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75276,7 +75307,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75300,7 +75331,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75327,13 +75358,13 @@ class TestCluster : public TestCommandBridge { id bitmap16Argument; bitmap16Argument = [NSNumber numberWithUnsignedShort:65535U]; [cluster writeAttributeBitmap16WithValue:bitmap16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP16 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP16 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75346,7 +75377,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75373,13 +75404,13 @@ class TestCluster : public TestCommandBridge { id bitmap16Argument; bitmap16Argument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeBitmap16WithValue:bitmap16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP16 Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP16 Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75392,7 +75423,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75416,7 +75447,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75443,13 +75474,13 @@ class TestCluster : public TestCommandBridge { id bitmap32Argument; bitmap32Argument = [NSNumber numberWithUnsignedInt:4294967295UL]; [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP32 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75462,7 +75493,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75489,13 +75520,13 @@ class TestCluster : public TestCommandBridge { id bitmap32Argument; bitmap32Argument = [NSNumber numberWithUnsignedInt:0UL]; [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP32 Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75508,7 +75539,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75532,7 +75563,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75559,13 +75590,13 @@ class TestCluster : public TestCommandBridge { id bitmap64Argument; bitmap64Argument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; [cluster writeAttributeBitmap64WithValue:bitmap64Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP64 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP64 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75578,7 +75609,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75605,13 +75636,13 @@ class TestCluster : public TestCommandBridge { id bitmap64Argument; bitmap64Argument = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster writeAttributeBitmap64WithValue:bitmap64Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP64 Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP64 Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75624,7 +75655,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75648,7 +75679,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75675,13 +75706,13 @@ class TestCluster : public TestCommandBridge { id int8uArgument; int8uArgument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeInt8uWithValue:int8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8U Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8U Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75694,7 +75725,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75721,13 +75752,13 @@ class TestCluster : public TestCommandBridge { id int8uArgument; int8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeInt8uWithValue:int8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8U Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8U Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75740,7 +75771,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75764,7 +75795,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75791,13 +75822,13 @@ class TestCluster : public TestCommandBridge { id int16uArgument; int16uArgument = [NSNumber numberWithUnsignedShort:65535U]; [cluster writeAttributeInt16uWithValue:int16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16U Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16U Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75810,7 +75841,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75837,13 +75868,13 @@ class TestCluster : public TestCommandBridge { id int16uArgument; int16uArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeInt16uWithValue:int16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16U Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16U Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75856,7 +75887,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75880,7 +75911,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75907,13 +75938,13 @@ class TestCluster : public TestCommandBridge { id int32uArgument; int32uArgument = [NSNumber numberWithUnsignedInt:4294967295UL]; [cluster writeAttributeInt32uWithValue:int32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32U Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75926,7 +75957,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75953,13 +75984,13 @@ class TestCluster : public TestCommandBridge { id int32uArgument; int32uArgument = [NSNumber numberWithUnsignedInt:0UL]; [cluster writeAttributeInt32uWithValue:int32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32U Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -75972,7 +76003,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -75996,7 +76027,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76023,13 +76054,13 @@ class TestCluster : public TestCommandBridge { id int64uArgument; int64uArgument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; [cluster writeAttributeInt64uWithValue:int64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64U Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT64U Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76042,7 +76073,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76069,13 +76100,13 @@ class TestCluster : public TestCommandBridge { id int64uArgument; int64uArgument = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster writeAttributeInt64uWithValue:int64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64U Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT64U Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76088,7 +76119,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76112,7 +76143,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76139,13 +76170,13 @@ class TestCluster : public TestCommandBridge { id int8sArgument; int8sArgument = [NSNumber numberWithChar:127]; [cluster writeAttributeInt8sWithValue:int8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8S Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76158,7 +76189,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76185,13 +76216,13 @@ class TestCluster : public TestCommandBridge { id int8sArgument; int8sArgument = [NSNumber numberWithChar:-128]; [cluster writeAttributeInt8sWithValue:int8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8S Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76204,7 +76235,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76231,13 +76262,13 @@ class TestCluster : public TestCommandBridge { id int8sArgument; int8sArgument = [NSNumber numberWithChar:0]; [cluster writeAttributeInt8sWithValue:int8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8S Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76250,7 +76281,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76274,7 +76305,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76301,13 +76332,13 @@ class TestCluster : public TestCommandBridge { id int16sArgument; int16sArgument = [NSNumber numberWithShort:32767]; [cluster writeAttributeInt16sWithValue:int16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16S Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76320,7 +76351,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76347,13 +76378,13 @@ class TestCluster : public TestCommandBridge { id int16sArgument; int16sArgument = [NSNumber numberWithShort:-32768]; [cluster writeAttributeInt16sWithValue:int16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16S Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76366,7 +76397,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76393,13 +76424,13 @@ class TestCluster : public TestCommandBridge { id int16sArgument; int16sArgument = [NSNumber numberWithShort:0]; [cluster writeAttributeInt16sWithValue:int16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16S Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76412,7 +76443,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76436,7 +76467,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76463,13 +76494,13 @@ class TestCluster : public TestCommandBridge { id int32sArgument; int32sArgument = [NSNumber numberWithInt:2147483647L]; [cluster writeAttributeInt32sWithValue:int32sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32S Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76482,7 +76513,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76509,13 +76540,13 @@ class TestCluster : public TestCommandBridge { id int32sArgument; int32sArgument = [NSNumber numberWithInt:-2147483648L]; [cluster writeAttributeInt32sWithValue:int32sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32S Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76528,7 +76559,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76555,13 +76586,13 @@ class TestCluster : public TestCommandBridge { id int32sArgument; int32sArgument = [NSNumber numberWithInt:0L]; [cluster writeAttributeInt32sWithValue:int32sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32S Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76574,7 +76605,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76598,7 +76629,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76625,13 +76656,13 @@ class TestCluster : public TestCommandBridge { id int64sArgument; int64sArgument = [NSNumber numberWithLongLong:9223372036854775807LL]; [cluster writeAttributeInt64sWithValue:int64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64S Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT64S Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76644,7 +76675,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76671,13 +76702,13 @@ class TestCluster : public TestCommandBridge { id int64sArgument; int64sArgument = [NSNumber numberWithLongLong:-9223372036854775807LL]; [cluster writeAttributeInt64sWithValue:int64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64S Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT64S Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76690,7 +76721,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76717,13 +76748,13 @@ class TestCluster : public TestCommandBridge { id int64sArgument; int64sArgument = [NSNumber numberWithLongLong:0LL]; [cluster writeAttributeInt64sWithValue:int64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64S Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT64S Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76736,7 +76767,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76760,7 +76791,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute SINGLE Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76787,13 +76818,13 @@ class TestCluster : public TestCommandBridge { id floatSingleArgument; floatSingleArgument = [NSNumber numberWithFloat:0.1f]; [cluster writeAttributeFloatSingleWithValue:floatSingleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute SINGLE medium Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute SINGLE medium Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76806,7 +76837,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute SINGLE medium Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76833,13 +76864,13 @@ class TestCluster : public TestCommandBridge { id floatSingleArgument; floatSingleArgument = [NSNumber numberWithFloat:17000000000.0f]; [cluster writeAttributeFloatSingleWithValue:floatSingleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute SINGLE large Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute SINGLE large Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76852,7 +76883,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute SINGLE large Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76879,13 +76910,13 @@ class TestCluster : public TestCommandBridge { id floatSingleArgument; floatSingleArgument = [NSNumber numberWithFloat:1.7e-10f]; [cluster writeAttributeFloatSingleWithValue:floatSingleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute SINGLE small Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute SINGLE small Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76898,7 +76929,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute SINGLE small Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76925,13 +76956,13 @@ class TestCluster : public TestCommandBridge { id floatSingleArgument; floatSingleArgument = [NSNumber numberWithFloat:0.0f]; [cluster writeAttributeFloatSingleWithValue:floatSingleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute SINGLE Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute SINGLE Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -76944,7 +76975,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute SINGLE Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76968,7 +76999,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute DOUBLE Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -76995,13 +77026,13 @@ class TestCluster : public TestCommandBridge { id floatDoubleArgument; floatDoubleArgument = [NSNumber numberWithDouble:0.1234567890123]; [cluster writeAttributeFloatDoubleWithValue:floatDoubleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute DOUBLE medium Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute DOUBLE medium Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77014,7 +77045,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute DOUBLE medium Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77041,13 +77072,13 @@ class TestCluster : public TestCommandBridge { id floatDoubleArgument; floatDoubleArgument = [NSNumber numberWithDouble:1.7e+200]; [cluster writeAttributeFloatDoubleWithValue:floatDoubleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute DOUBLE large Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute DOUBLE large Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77060,7 +77091,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute DOUBLE large Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77087,13 +77118,13 @@ class TestCluster : public TestCommandBridge { id floatDoubleArgument; floatDoubleArgument = [NSNumber numberWithDouble:1.7e-200]; [cluster writeAttributeFloatDoubleWithValue:floatDoubleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute DOUBLE small Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute DOUBLE small Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77106,7 +77137,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute DOUBLE small Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77133,13 +77164,13 @@ class TestCluster : public TestCommandBridge { id floatDoubleArgument; floatDoubleArgument = [NSNumber numberWithDouble:0]; [cluster writeAttributeFloatDoubleWithValue:floatDoubleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute DOUBLE Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute DOUBLE Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77152,7 +77183,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute DOUBLE Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77176,7 +77207,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77203,13 +77234,13 @@ class TestCluster : public TestCommandBridge { id enum8Argument; enum8Argument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeEnum8WithValue:enum8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM8 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM8 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77222,7 +77253,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77249,13 +77280,13 @@ class TestCluster : public TestCommandBridge { id enum8Argument; enum8Argument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeEnum8WithValue:enum8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM8 Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM8 Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77268,7 +77299,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77292,7 +77323,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77319,13 +77350,13 @@ class TestCluster : public TestCommandBridge { id enum16Argument; enum16Argument = [NSNumber numberWithUnsignedShort:65535U]; [cluster writeAttributeEnum16WithValue:enum16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM16 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM16 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77338,7 +77369,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77365,13 +77396,13 @@ class TestCluster : public TestCommandBridge { id enum16Argument; enum16Argument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeEnum16WithValue:enum16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM16 Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM16 Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77384,7 +77415,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77408,7 +77439,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77435,13 +77466,13 @@ class TestCluster : public TestCommandBridge { id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"Tes\000ti\000ng" length:9]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute OCTET_STRING with embedded null Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute OCTET_STRING with embedded null Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77454,7 +77485,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING with embedded null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77482,13 +77513,13 @@ class TestCluster : public TestCommandBridge { id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"\x00\x01\x02\x03\x04\x05" length:6]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute OCTET_STRING with hex: format Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute OCTET_STRING with hex: format Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77501,7 +77532,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING with hex: format Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77529,13 +77560,13 @@ class TestCluster : public TestCommandBridge { id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"\015\012\377\042\240" length:5]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute OCTET_STRING with weird chars Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute OCTET_STRING with weird chars Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77548,7 +77579,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING with weird chars Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77576,13 +77607,13 @@ class TestCluster : public TestCommandBridge { id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"TestValue" length:9]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute OCTET_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute OCTET_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77595,7 +77626,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77623,16 +77654,17 @@ class TestCluster : public TestCommandBridge { id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"TestValueLongerThan10" length:21]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute OCTET_STRING Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute OCTET_STRING Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77645,7 +77677,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77673,13 +77705,13 @@ class TestCluster : public TestCommandBridge { id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"" length:0]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute OCTET_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute OCTET_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77692,7 +77724,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLongOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLongOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LONG_OCTET_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77723,13 +77755,13 @@ class TestCluster : public TestCommandBridge { "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" length:300]; [cluster writeAttributeLongOctetStringWithValue:longOctetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute LONG_OCTET_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute LONG_OCTET_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77742,7 +77774,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLongOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLongOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LONG_OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77775,13 +77807,13 @@ class TestCluster : public TestCommandBridge { id longOctetStringArgument; longOctetStringArgument = [[NSData alloc] initWithBytes:"" length:0]; [cluster writeAttributeLongOctetStringWithValue:longOctetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute LONG_OCTET_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute LONG_OCTET_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77794,7 +77826,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77821,13 +77853,13 @@ class TestCluster : public TestCommandBridge { id charStringArgument; charStringArgument = @"☉T☉"; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77840,7 +77872,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77866,17 +77898,18 @@ class TestCluster : public TestCommandBridge { id charStringArgument; charStringArgument = @"☉TestValueLongerThan10☉"; - [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING - Value too long Error: %@", err); + [cluster + writeAttributeCharStringWithValue:charStringArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING - Value too long Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77889,7 +77922,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77916,13 +77949,13 @@ class TestCluster : public TestCommandBridge { id charStringArgument; charStringArgument = @""; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING - Empty Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING - Empty Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77935,7 +77968,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLongCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLongCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LONG_CHAR_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -77965,13 +77998,13 @@ class TestCluster : public TestCommandBridge { @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉" @"☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉☉"; [cluster writeAttributeLongCharStringWithValue:longCharStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute LONG_CHAR_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute LONG_CHAR_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -77984,7 +78017,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLongCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLongCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LONG_CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78014,13 +78047,13 @@ class TestCluster : public TestCommandBridge { id longCharStringArgument; longCharStringArgument = @""; [cluster writeAttributeLongCharStringWithValue:longCharStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute LONG_CHAR_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute LONG_CHAR_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78033,7 +78066,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListLongOctetStringWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListLongOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LIST_LONG_OCTET_STRING (for chunked read) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78138,14 +78171,15 @@ class TestCluster : public TestCommandBridge { length:512]; listLongOctetStringArgument = temp_0; } - [cluster writeAttributeListLongOctetStringWithValue:listLongOctetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute LIST_LONG_OCTET_STRING (for chunked write) Error: %@", err); + [cluster + writeAttributeListLongOctetStringWithValue:listLongOctetStringArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute LIST_LONG_OCTET_STRING (for chunked write) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78158,7 +78192,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListLongOctetStringWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListLongOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LIST_LONG_OCTET_STRING (for chunked read) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78227,7 +78261,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78254,13 +78288,13 @@ class TestCluster : public TestCommandBridge { id epochUsArgument; epochUsArgument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; [cluster writeAttributeEpochUsWithValue:epochUsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_US Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute EPOCH_US Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78273,7 +78307,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78300,13 +78334,13 @@ class TestCluster : public TestCommandBridge { id epochUsArgument; epochUsArgument = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster writeAttributeEpochUsWithValue:epochUsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_US Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute EPOCH_US Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78319,7 +78353,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78343,7 +78377,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78370,13 +78404,13 @@ class TestCluster : public TestCommandBridge { id epochSArgument; epochSArgument = [NSNumber numberWithUnsignedInt:4294967295UL]; [cluster writeAttributeEpochSWithValue:epochSArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_S Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute EPOCH_S Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78389,7 +78423,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78416,13 +78450,13 @@ class TestCluster : public TestCommandBridge { id epochSArgument; epochSArgument = [NSNumber numberWithUnsignedInt:0UL]; [cluster writeAttributeEpochSWithValue:epochSArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_S Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute EPOCH_S Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78435,7 +78469,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78459,7 +78493,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUnsupportedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeUnsupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute UNSUPPORTED Error: %@", err); if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { @@ -78491,18 +78525,18 @@ class TestCluster : public TestCommandBridge { id unsupportedArgument; unsupportedArgument = [NSNumber numberWithBool:0]; [cluster writeAttributeUnsupportedWithValue:unsupportedArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writeattribute UNSUPPORTED Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Writeattribute UNSUPPORTED Error: %@", err); - if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + if (err.code == MTRInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78515,7 +78549,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster testWithCompletionHandler:^(NSError * _Nullable err) { + [cluster testWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send Test Command to unsupported endpoint Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -78535,7 +78569,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster testWithCompletionHandler:^(NSError * _Nullable err) { + [cluster testWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send Test Command to unsupported cluster Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -78555,7 +78589,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor_id Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78582,13 +78616,13 @@ class TestCluster : public TestCommandBridge { id vendorIdArgument; vendorIdArgument = [NSNumber numberWithUnsignedShort:17U]; [cluster writeAttributeVendorIdWithValue:vendorIdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute vendor_id Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute vendor_id Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78601,7 +78635,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor_id Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -78628,13 +78662,13 @@ class TestCluster : public TestCommandBridge { id vendorIdArgument; vendorIdArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeVendorIdWithValue:vendorIdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Restore attribute vendor_id Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Restore attribute vendor_id Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78652,23 +78686,23 @@ class TestCluster : public TestCommandBridge { params.arg2 = [NSNumber numberWithUnsignedChar:1U]; [cluster testEnumsRequestWithParams:params - completionHandler:^(MTRTestClusterClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send a command with a vendor_id and enum Error: %@", err); + completion:^(MTRTestClusterClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send a command with a vendor_id and enum Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.arg1; - VerifyOrReturn(CheckValue("arg1", actualValue, 20003U)); - } + { + id actualValue = values.arg1; + VerifyOrReturn(CheckValue("arg1", actualValue, 20003U)); + } - { - id actualValue = values.arg2; - VerifyOrReturn(CheckValue("arg2", actualValue, 1U)); - } + { + id actualValue = values.arg2; + VerifyOrReturn(CheckValue("arg2", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78686,23 +78720,23 @@ class TestCluster : public TestCommandBridge { params.arg2 = [NSNumber numberWithUnsignedChar:101U]; [cluster testEnumsRequestWithParams:params - completionHandler:^(MTRTestClusterClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send a command with a vendor_id and invalid enum Error: %@", err); + completion:^(MTRTestClusterClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send a command with a vendor_id and invalid enum Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.arg1; - VerifyOrReturn(CheckValue("arg1", actualValue, 20003U)); - } + { + id actualValue = values.arg1; + VerifyOrReturn(CheckValue("arg1", actualValue, 20003U)); + } - { - id actualValue = values.arg2; - VerifyOrReturn(CheckValue("arg2", actualValue, 4U)); - } + { + id actualValue = values.arg2; + VerifyOrReturn(CheckValue("arg2", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78727,19 +78761,19 @@ class TestCluster : public TestCommandBridge { ((MTRTestClusterClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0]; [cluster testStructArgumentRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterBooleanResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Command With Struct Argument and arg1.b is true Error: %@", err); + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With Struct Argument and arg1.b is true Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, true)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, true)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78764,19 +78798,19 @@ class TestCluster : public TestCommandBridge { ((MTRTestClusterClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0]; [cluster testStructArgumentRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterBooleanResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Command With Struct Argument and arg1.b is false Error: %@", err); + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With Struct Argument and arg1.b is false Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, false)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, false)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78812,19 +78846,21 @@ class TestCluster : public TestCommandBridge { [cluster testNestedStructArgumentRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterBooleanResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Command With Nested Struct Argument and arg1.c.b is true Error: %@", err); + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog( + @"Send Test Command With Nested Struct Argument and arg1.c.b is true Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, true)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, true)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78860,19 +78896,20 @@ class TestCluster : public TestCommandBridge { [cluster testNestedStructArgumentRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterBooleanResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Command With Nested Struct Argument arg1.c.b is false Error: %@", err); + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With Nested Struct Argument arg1.c.b is false Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, false)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, false)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -78952,21 +78989,21 @@ class TestCluster : public TestCommandBridge { } [cluster testNestedStructListArgumentRequestWithParams:params - completionHandler:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With Nested Struct List Argument and all fields b of " - @"arg1.d are true Error: %@", - err); + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With Nested Struct List Argument and all fields " + @"b of arg1.d are true Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, true)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, true)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79046,21 +79083,21 @@ class TestCluster : public TestCommandBridge { } [cluster testNestedStructListArgumentRequestWithParams:params - completionHandler:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With Nested Struct List Argument and some fields b of " - @"arg1.d are false Error: %@", - err); + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With Nested Struct List Argument and some fields " + @"b of arg1.d are false Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, false)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, false)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79086,28 +79123,35 @@ class TestCluster : public TestCommandBridge { [cluster simpleStructEchoRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterSimpleStructResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Command With Struct Argument and see what we get back Error: %@", err); + completion:^(MTRTestClusterClusterSimpleStructResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With Struct Argument and see what we get back Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.arg1; - VerifyOrReturn(CheckValue("a", ((MTRTestClusterClusterSimpleStruct *) actualValue).a, 17U)); - VerifyOrReturn(CheckValue("b", ((MTRTestClusterClusterSimpleStruct *) actualValue).b, false)); - VerifyOrReturn(CheckValue("c", ((MTRTestClusterClusterSimpleStruct *) actualValue).c, 2U)); - VerifyOrReturn(CheckValueAsString("d", ((MTRTestClusterClusterSimpleStruct *) actualValue).d, - [[NSData alloc] initWithBytes:"octet_string" length:12])); - VerifyOrReturn(CheckValueAsString( - "e", ((MTRTestClusterClusterSimpleStruct *) actualValue).e, @"char_string")); - VerifyOrReturn(CheckValue("f", ((MTRTestClusterClusterSimpleStruct *) actualValue).f, 1U)); - VerifyOrReturn(CheckValue("g", ((MTRTestClusterClusterSimpleStruct *) actualValue).g, 0.1f)); - VerifyOrReturn(CheckValue("h", ((MTRTestClusterClusterSimpleStruct *) actualValue).h, 0.1)); - } + { + id actualValue = values.arg1; + VerifyOrReturn( + CheckValue("a", ((MTRTestClusterClusterSimpleStruct *) actualValue).a, 17U)); + VerifyOrReturn( + CheckValue("b", ((MTRTestClusterClusterSimpleStruct *) actualValue).b, false)); + VerifyOrReturn( + CheckValue("c", ((MTRTestClusterClusterSimpleStruct *) actualValue).c, 2U)); + VerifyOrReturn( + CheckValueAsString("d", ((MTRTestClusterClusterSimpleStruct *) actualValue).d, + [[NSData alloc] initWithBytes:"octet_string" length:12])); + VerifyOrReturn(CheckValueAsString( + "e", ((MTRTestClusterClusterSimpleStruct *) actualValue).e, @"char_string")); + VerifyOrReturn( + CheckValue("f", ((MTRTestClusterClusterSimpleStruct *) actualValue).f, 1U)); + VerifyOrReturn( + CheckValue("g", ((MTRTestClusterClusterSimpleStruct *) actualValue).g, 0.1f)); + VerifyOrReturn( + CheckValue("h", ((MTRTestClusterClusterSimpleStruct *) actualValue).h, 0.1)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79136,19 +79180,20 @@ class TestCluster : public TestCommandBridge { } [cluster testListInt8UArgumentRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterBooleanResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Command With List of INT8U and none of them is set to 0 Error: %@", err); + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With List of INT8U and none of them is set to 0 Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, true)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, true)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79176,20 +79221,22 @@ class TestCluster : public TestCommandBridge { temp_0[9] = [NSNumber numberWithUnsignedChar:0U]; params.arg1 = temp_0; } - [cluster testListInt8UArgumentRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterBooleanResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Command With List of INT8U and one of them is set to 0 Error: %@", err); + [cluster + testListInt8UArgumentRequestWithParams:params + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog( + @"Send Test Command With List of INT8U and one of them is set to 0 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, false)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, false)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79216,29 +79263,30 @@ class TestCluster : public TestCommandBridge { temp_0[8] = [NSNumber numberWithUnsignedChar:9U]; params.arg1 = temp_0; } - [cluster testListInt8UReverseRequestWithParams:params - completionHandler:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With List of INT8U and get it reversed Error: %@", err); + [cluster + testListInt8UReverseRequestWithParams:params + completion:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With List of INT8U and get it reversed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.arg1; - VerifyOrReturn(CheckValue("arg1", [actualValue count], static_cast(9))); - VerifyOrReturn(CheckValue("", actualValue[0], 9U)); - VerifyOrReturn(CheckValue("", actualValue[1], 8U)); - VerifyOrReturn(CheckValue("", actualValue[2], 7U)); - VerifyOrReturn(CheckValue("", actualValue[3], 6U)); - VerifyOrReturn(CheckValue("", actualValue[4], 5U)); - VerifyOrReturn(CheckValue("", actualValue[5], 4U)); - VerifyOrReturn(CheckValue("", actualValue[6], 3U)); - VerifyOrReturn(CheckValue("", actualValue[7], 2U)); - VerifyOrReturn(CheckValue("", actualValue[8], 1U)); - } + { + id actualValue = values.arg1; + VerifyOrReturn(CheckValue("arg1", [actualValue count], static_cast(9))); + VerifyOrReturn(CheckValue("", actualValue[0], 9U)); + VerifyOrReturn(CheckValue("", actualValue[1], 8U)); + VerifyOrReturn(CheckValue("", actualValue[2], 7U)); + VerifyOrReturn(CheckValue("", actualValue[3], 6U)); + VerifyOrReturn(CheckValue("", actualValue[4], 5U)); + VerifyOrReturn(CheckValue("", actualValue[5], 4U)); + VerifyOrReturn(CheckValue("", actualValue[6], 3U)); + VerifyOrReturn(CheckValue("", actualValue[7], 2U)); + VerifyOrReturn(CheckValue("", actualValue[8], 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79258,19 +79306,20 @@ class TestCluster : public TestCommandBridge { } [cluster testListInt8UReverseRequestWithParams:params - completionHandler:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With empty List of INT8U and get an empty list back Error: %@", err); + completion:^(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With empty List of INT8U and get an empty list back Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.arg1; - VerifyOrReturn(CheckValue("arg1", [actualValue count], static_cast(0))); - } + { + id actualValue = values.arg1; + VerifyOrReturn(CheckValue("arg1", [actualValue count], static_cast(0))); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79309,21 +79358,21 @@ class TestCluster : public TestCommandBridge { params.arg1 = temp_0; } [cluster testListStructArgumentRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterBooleanResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Command With List of Struct Argument and arg1.b of first item is true " - @"Error: %@", - err); + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With List of Struct Argument and arg1.b of first item " + @"is true Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, true)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, true)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79362,21 +79411,21 @@ class TestCluster : public TestCommandBridge { params.arg1 = temp_0; } [cluster testListStructArgumentRequestWithParams:params - completionHandler:^( - MTRTestClusterClusterBooleanResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Command With List of Struct Argument and arg1.b of first item is " - @"false Error: %@", - err); + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With List of Struct Argument and arg1.b of first item " + @"is false Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, false)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, false)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79462,21 +79511,21 @@ class TestCluster : public TestCommandBridge { params.arg1 = temp_0; } [cluster testListNestedStructListArgumentRequestWithParams:params - completionHandler:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With List of Nested Struct List Argument and all " - @"fields b of elements of arg1.d are true Error: %@", - err); + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With List of Nested Struct List Argument and " + @"all fields b of elements of arg1.d are true Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, true)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, true)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79562,21 +79611,21 @@ class TestCluster : public TestCommandBridge { params.arg1 = temp_0; } [cluster testListNestedStructListArgumentRequestWithParams:params - completionHandler:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command With Nested Struct List Argument and some fields b " - @"of elements of arg1.d are false Error: %@", - err); + completion:^(MTRTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With Nested Struct List Argument and some " + @"fields b of elements of arg1.d are false Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, false)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, false)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79598,14 +79647,15 @@ class TestCluster : public TestCommandBridge { temp_0[3] = [NSNumber numberWithUnsignedChar:4U]; listInt8uArgument = temp_0; } - [cluster writeAttributeListInt8uWithValue:listInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute LIST With List of INT8U and none of them is set to 0 Error: %@", err); + [cluster + writeAttributeListInt8uWithValue:listInt8uArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute LIST With List of INT8U and none of them is set to 0 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79618,7 +79668,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LIST With List of INT8U Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -79656,13 +79706,13 @@ class TestCluster : public TestCommandBridge { listOctetStringArgument = temp_0; } [cluster writeAttributeListOctetStringWithValue:listOctetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute LIST With List of OCTET_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute LIST With List of OCTET_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79675,7 +79725,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListOctetStringWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LIST With List of OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -79724,14 +79774,16 @@ class TestCluster : public TestCommandBridge { listStructOctetStringArgument = temp_0; } - [cluster writeAttributeListStructOctetStringWithValue:listStructOctetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute LIST With List of LIST_STRUCT_OCTET_STRING Error: %@", err); + [cluster + writeAttributeListStructOctetStringWithValue:listStructOctetStringArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"Write attribute LIST With List of LIST_STRUCT_OCTET_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79744,7 +79796,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListStructOctetStringWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListStructOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LIST With List of LIST_STRUCT_OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -79783,35 +79835,35 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init]; params.arg1 = [NSNumber numberWithUnsignedChar:5U]; [cluster testNullableOptionalRequestWithParams:params - completionHandler:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command with optional arg set. Error: %@", err); + completion:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command with optional arg set. Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.wasPresent; - VerifyOrReturn(CheckValue("wasPresent", actualValue, true)); - } + { + id actualValue = values.wasPresent; + VerifyOrReturn(CheckValue("wasPresent", actualValue, true)); + } - { - id actualValue = values.wasNull; - VerifyOrReturn(CheckValue("wasNull", actualValue, false)); - } + { + id actualValue = values.wasNull; + VerifyOrReturn(CheckValue("wasNull", actualValue, false)); + } - { - id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, 5U)); - } + { + id actualValue = values.value; + VerifyOrReturn(CheckValue("value", actualValue, 5U)); + } - { - id actualValue = values.originalValue; - VerifyOrReturn(CheckValueNonNull("originalValue", actualValue)); - VerifyOrReturn(CheckValue("originalValue", actualValue, 5U)); - } + { + id actualValue = values.originalValue; + VerifyOrReturn(CheckValueNonNull("originalValue", actualValue)); + VerifyOrReturn(CheckValue("originalValue", actualValue, 5U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79826,19 +79878,19 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[MTRTestClusterClusterTestNullableOptionalRequestParams alloc] init]; [cluster testNullableOptionalRequestWithParams:params - completionHandler:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values, - NSError * _Nullable err) { - NSLog(@"Send Test Command without its optional arg. Error: %@", err); + completion:^(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command without its optional arg. Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.wasPresent; - VerifyOrReturn(CheckValue("wasPresent", actualValue, false)); - } + { + id actualValue = values.wasPresent; + VerifyOrReturn(CheckValue("wasPresent", actualValue, false)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79851,8 +79903,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListNullablesAndOptionalsStructWithCompletionHandler:^( - NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListNullablesAndOptionalsStructWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read list of structs containing nullables and optionals Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -79900,16 +79951,16 @@ class TestCluster : public TestCommandBridge { listNullablesAndOptionalsStructArgument = temp_0; } - [cluster - writeAttributeListNullablesAndOptionalsStructWithValue:listNullablesAndOptionalsStructArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write list of structs containing nullables and optionals Error: %@", - err); + [cluster writeAttributeListNullablesAndOptionalsStructWithValue:listNullablesAndOptionalsStructArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write list of structs containing nullables and optionals " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79922,8 +79973,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListNullablesAndOptionalsStructWithCompletionHandler:^( - NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListNullablesAndOptionalsStructWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read list of structs containing nullables and optionals after writing Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -79965,13 +80015,13 @@ class TestCluster : public TestCommandBridge { id nullableBooleanArgument; nullableBooleanArgument = nil; [cluster writeAttributeNullableBooleanWithValue:nullableBooleanArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BOOLEAN null Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BOOLEAN null Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -79985,7 +80035,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BOOLEAN null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80015,13 +80065,13 @@ class TestCluster : public TestCommandBridge { id nullableBooleanArgument; nullableBooleanArgument = [NSNumber numberWithBool:true]; [cluster writeAttributeNullableBooleanWithValue:nullableBooleanArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BOOLEAN True Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BOOLEAN True Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80034,7 +80084,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BOOLEAN True Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80059,7 +80109,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BOOLEAN not null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80085,13 +80135,13 @@ class TestCluster : public TestCommandBridge { id nullableBitmap8Argument; nullableBitmap8Argument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP8 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP8 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80104,7 +80154,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP8 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80131,18 +80181,18 @@ class TestCluster : public TestCommandBridge { id nullableBitmap8Argument; nullableBitmap8Argument = [NSNumber numberWithUnsignedChar:255U]; - [cluster - writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP8 Invalid Value Error: %@", err); + [cluster writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP8 Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80156,7 +80206,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP8 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80187,13 +80237,13 @@ class TestCluster : public TestCommandBridge { id nullableBitmap8Argument; nullableBitmap8Argument = nil; [cluster writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP8 null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP8 null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80206,7 +80256,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP8 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80230,7 +80280,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP8 not 254 Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80256,13 +80306,13 @@ class TestCluster : public TestCommandBridge { id nullableBitmap16Argument; nullableBitmap16Argument = [NSNumber numberWithUnsignedShort:65534U]; [cluster writeAttributeNullableBitmap16WithValue:nullableBitmap16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP16 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP16 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80275,7 +80325,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP16 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80302,18 +80352,18 @@ class TestCluster : public TestCommandBridge { id nullableBitmap16Argument; nullableBitmap16Argument = [NSNumber numberWithUnsignedShort:65535U]; - [cluster - writeAttributeNullableBitmap16WithValue:nullableBitmap16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP16 Invalid Value Error: %@", err); + [cluster writeAttributeNullableBitmap16WithValue:nullableBitmap16Argument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP16 Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80326,7 +80376,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP16 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80354,13 +80404,13 @@ class TestCluster : public TestCommandBridge { id nullableBitmap16Argument; nullableBitmap16Argument = nil; [cluster writeAttributeNullableBitmap16WithValue:nullableBitmap16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP16 null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP16 null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80373,7 +80423,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP16 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80400,13 +80450,13 @@ class TestCluster : public TestCommandBridge { id nullableBitmap32Argument; nullableBitmap32Argument = [NSNumber numberWithUnsignedInt:4294967294UL]; [cluster writeAttributeNullableBitmap32WithValue:nullableBitmap32Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP32 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP32 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80419,7 +80469,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP32 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80446,18 +80496,18 @@ class TestCluster : public TestCommandBridge { id nullableBitmap32Argument; nullableBitmap32Argument = [NSNumber numberWithUnsignedInt:4294967295UL]; - [cluster - writeAttributeNullableBitmap32WithValue:nullableBitmap32Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP32 Invalid Value Error: %@", err); + [cluster writeAttributeNullableBitmap32WithValue:nullableBitmap32Argument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP32 Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80470,7 +80520,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP32 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80498,13 +80548,13 @@ class TestCluster : public TestCommandBridge { id nullableBitmap32Argument; nullableBitmap32Argument = nil; [cluster writeAttributeNullableBitmap32WithValue:nullableBitmap32Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP32 null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP32 null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80517,7 +80567,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP32 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80544,13 +80594,13 @@ class TestCluster : public TestCommandBridge { id nullableBitmap64Argument; nullableBitmap64Argument = [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; [cluster writeAttributeNullableBitmap64WithValue:nullableBitmap64Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP64 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP64 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80563,7 +80613,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP64 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80590,18 +80640,18 @@ class TestCluster : public TestCommandBridge { id nullableBitmap64Argument; nullableBitmap64Argument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; - [cluster - writeAttributeNullableBitmap64WithValue:nullableBitmap64Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP64 Invalid Value Error: %@", err); + [cluster writeAttributeNullableBitmap64WithValue:nullableBitmap64Argument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP64 Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80614,7 +80664,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP64 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80642,13 +80692,13 @@ class TestCluster : public TestCommandBridge { id nullableBitmap64Argument; nullableBitmap64Argument = nil; [cluster writeAttributeNullableBitmap64WithValue:nullableBitmap64Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP64 null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP64 null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80661,7 +80711,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_BITMAP64 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80688,13 +80738,13 @@ class TestCluster : public TestCommandBridge { id nullableInt8uArgument; nullableInt8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8U Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT8U Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80707,7 +80757,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80735,13 +80785,13 @@ class TestCluster : public TestCommandBridge { id nullableInt8uArgument; nullableInt8uArgument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8U Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT8U Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80754,7 +80804,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80781,18 +80831,18 @@ class TestCluster : public TestCommandBridge { id nullableInt8uArgument; nullableInt8uArgument = [NSNumber numberWithUnsignedChar:255U]; - [cluster - writeAttributeNullableInt8uWithValue:nullableInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8U Invalid Value Error: %@", err); + [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT8U Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80805,7 +80855,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80830,7 +80880,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U unchanged Value with constraint Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80856,13 +80906,13 @@ class TestCluster : public TestCommandBridge { id nullableInt8uArgument; nullableInt8uArgument = nil; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8U null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT8U null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80875,7 +80925,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80899,7 +80949,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80924,7 +80974,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80950,13 +81000,13 @@ class TestCluster : public TestCommandBridge { id nullableInt8uArgument; nullableInt8uArgument = [NSNumber numberWithUnsignedChar:128U]; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8U Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT8U Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -80969,7 +81019,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80994,7 +81044,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8U notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81020,13 +81070,13 @@ class TestCluster : public TestCommandBridge { id nullableInt16uArgument; nullableInt16uArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeNullableInt16uWithValue:nullableInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16U Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT16U Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81039,7 +81089,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81067,13 +81117,13 @@ class TestCluster : public TestCommandBridge { id nullableInt16uArgument; nullableInt16uArgument = [NSNumber numberWithUnsignedShort:65534U]; [cluster writeAttributeNullableInt16uWithValue:nullableInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16U Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT16U Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81086,7 +81136,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81113,18 +81163,18 @@ class TestCluster : public TestCommandBridge { id nullableInt16uArgument; nullableInt16uArgument = [NSNumber numberWithUnsignedShort:65535U]; - [cluster - writeAttributeNullableInt16uWithValue:nullableInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16U Invalid Value Error: %@", err); + [cluster writeAttributeNullableInt16uWithValue:nullableInt16uArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT16U Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81137,7 +81187,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81165,13 +81215,13 @@ class TestCluster : public TestCommandBridge { id nullableInt16uArgument; nullableInt16uArgument = nil; [cluster writeAttributeNullableInt16uWithValue:nullableInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16U null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT16U null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81184,7 +81234,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81208,7 +81258,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81233,7 +81283,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81259,13 +81309,13 @@ class TestCluster : public TestCommandBridge { id nullableInt16uArgument; nullableInt16uArgument = [NSNumber numberWithUnsignedShort:32000U]; [cluster writeAttributeNullableInt16uWithValue:nullableInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16U Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT16U Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81278,7 +81328,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81303,7 +81353,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16U notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81329,13 +81379,13 @@ class TestCluster : public TestCommandBridge { id nullableInt32uArgument; nullableInt32uArgument = [NSNumber numberWithUnsignedInt:0UL]; [cluster writeAttributeNullableInt32uWithValue:nullableInt32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32U Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT32U Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81348,7 +81398,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81376,13 +81426,13 @@ class TestCluster : public TestCommandBridge { id nullableInt32uArgument; nullableInt32uArgument = [NSNumber numberWithUnsignedInt:4294967294UL]; [cluster writeAttributeNullableInt32uWithValue:nullableInt32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32U Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT32U Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81395,7 +81445,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81422,18 +81472,18 @@ class TestCluster : public TestCommandBridge { id nullableInt32uArgument; nullableInt32uArgument = [NSNumber numberWithUnsignedInt:4294967295UL]; - [cluster - writeAttributeNullableInt32uWithValue:nullableInt32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32U Invalid Value Error: %@", err); + [cluster writeAttributeNullableInt32uWithValue:nullableInt32uArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT32U Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81446,7 +81496,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81474,13 +81524,13 @@ class TestCluster : public TestCommandBridge { id nullableInt32uArgument; nullableInt32uArgument = nil; [cluster writeAttributeNullableInt32uWithValue:nullableInt32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32U null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT32U null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81493,7 +81543,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81517,7 +81567,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81542,7 +81592,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81568,13 +81618,13 @@ class TestCluster : public TestCommandBridge { id nullableInt32uArgument; nullableInt32uArgument = [NSNumber numberWithUnsignedInt:2147483647UL]; [cluster writeAttributeNullableInt32uWithValue:nullableInt32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32U Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT32U Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81587,7 +81637,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81612,7 +81662,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32U notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81638,13 +81688,13 @@ class TestCluster : public TestCommandBridge { id nullableInt64uArgument; nullableInt64uArgument = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster writeAttributeNullableInt64uWithValue:nullableInt64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64U Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT64U Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81657,7 +81707,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81685,13 +81735,13 @@ class TestCluster : public TestCommandBridge { id nullableInt64uArgument; nullableInt64uArgument = [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; [cluster writeAttributeNullableInt64uWithValue:nullableInt64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64U Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT64U Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81704,7 +81754,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81731,18 +81781,18 @@ class TestCluster : public TestCommandBridge { id nullableInt64uArgument; nullableInt64uArgument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; - [cluster - writeAttributeNullableInt64uWithValue:nullableInt64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64U Invalid Value Error: %@", err); + [cluster writeAttributeNullableInt64uWithValue:nullableInt64uArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT64U Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81755,7 +81805,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81783,13 +81833,13 @@ class TestCluster : public TestCommandBridge { id nullableInt64uArgument; nullableInt64uArgument = nil; [cluster writeAttributeNullableInt64uWithValue:nullableInt64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64U null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT64U null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81802,7 +81852,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81826,7 +81876,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81852,7 +81902,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81878,13 +81928,13 @@ class TestCluster : public TestCommandBridge { id nullableInt64uArgument; nullableInt64uArgument = [NSNumber numberWithUnsignedLongLong:18000000000000000000ULL]; [cluster writeAttributeNullableInt64uWithValue:nullableInt64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64U Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT64U Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81897,7 +81947,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81923,7 +81973,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64U notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81949,13 +81999,13 @@ class TestCluster : public TestCommandBridge { id nullableInt8sArgument; nullableInt8sArgument = [NSNumber numberWithChar:-127]; [cluster writeAttributeNullableInt8sWithValue:nullableInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8S Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT8S Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -81968,7 +82018,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -81995,18 +82045,18 @@ class TestCluster : public TestCommandBridge { id nullableInt8sArgument; nullableInt8sArgument = [NSNumber numberWithChar:-128]; - [cluster - writeAttributeNullableInt8sWithValue:nullableInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8S Invalid Value Error: %@", err); + [cluster writeAttributeNullableInt8sWithValue:nullableInt8sArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT8S Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82019,7 +82069,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82047,13 +82097,13 @@ class TestCluster : public TestCommandBridge { id nullableInt8sArgument; nullableInt8sArgument = nil; [cluster writeAttributeNullableInt8sWithValue:nullableInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8S null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT8S null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82066,7 +82116,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82090,7 +82140,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82115,7 +82165,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82141,13 +82191,13 @@ class TestCluster : public TestCommandBridge { id nullableInt8sArgument; nullableInt8sArgument = [NSNumber numberWithChar:-127]; [cluster writeAttributeNullableInt8sWithValue:nullableInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT8S Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT8S Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82160,7 +82210,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82185,7 +82235,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT8S notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82211,13 +82261,13 @@ class TestCluster : public TestCommandBridge { id nullableInt16sArgument; nullableInt16sArgument = [NSNumber numberWithShort:-32767]; [cluster writeAttributeNullableInt16sWithValue:nullableInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16S Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT16S Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82230,7 +82280,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82257,18 +82307,18 @@ class TestCluster : public TestCommandBridge { id nullableInt16sArgument; nullableInt16sArgument = [NSNumber numberWithShort:-32768]; - [cluster - writeAttributeNullableInt16sWithValue:nullableInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16S Invalid Value Error: %@", err); + [cluster writeAttributeNullableInt16sWithValue:nullableInt16sArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT16S Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82281,7 +82331,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82309,13 +82359,13 @@ class TestCluster : public TestCommandBridge { id nullableInt16sArgument; nullableInt16sArgument = nil; [cluster writeAttributeNullableInt16sWithValue:nullableInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16S null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT16S null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82328,7 +82378,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82352,7 +82402,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82377,7 +82427,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82403,13 +82453,13 @@ class TestCluster : public TestCommandBridge { id nullableInt16sArgument; nullableInt16sArgument = [NSNumber numberWithShort:-32767]; [cluster writeAttributeNullableInt16sWithValue:nullableInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16S Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT16S Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82422,7 +82472,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82447,7 +82497,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT16S notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82473,13 +82523,13 @@ class TestCluster : public TestCommandBridge { id nullableInt32sArgument; nullableInt32sArgument = [NSNumber numberWithInt:-2147483647L]; [cluster writeAttributeNullableInt32sWithValue:nullableInt32sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32S Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT32S Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82492,7 +82542,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82519,18 +82569,18 @@ class TestCluster : public TestCommandBridge { id nullableInt32sArgument; nullableInt32sArgument = [NSNumber numberWithInt:-2147483648L]; - [cluster - writeAttributeNullableInt32sWithValue:nullableInt32sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32S Invalid Value Error: %@", err); + [cluster writeAttributeNullableInt32sWithValue:nullableInt32sArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT32S Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82543,7 +82593,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82571,13 +82621,13 @@ class TestCluster : public TestCommandBridge { id nullableInt32sArgument; nullableInt32sArgument = nil; [cluster writeAttributeNullableInt32sWithValue:nullableInt32sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32S null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT32S null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82590,7 +82640,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82614,7 +82664,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82639,7 +82689,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82665,13 +82715,13 @@ class TestCluster : public TestCommandBridge { id nullableInt32sArgument; nullableInt32sArgument = [NSNumber numberWithInt:-2147483647L]; [cluster writeAttributeNullableInt32sWithValue:nullableInt32sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32S Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT32S Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82684,7 +82734,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82709,7 +82759,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT32S notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82735,13 +82785,13 @@ class TestCluster : public TestCommandBridge { id nullableInt64sArgument; nullableInt64sArgument = [NSNumber numberWithLongLong:-9223372036854775807LL]; [cluster writeAttributeNullableInt64sWithValue:nullableInt64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64S Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT64S Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82754,7 +82804,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82781,18 +82831,18 @@ class TestCluster : public TestCommandBridge { id nullableInt64sArgument; nullableInt64sArgument = [NSNumber numberWithLongLong:-9223372036854775807LL - 1LL]; - [cluster - writeAttributeNullableInt64sWithValue:nullableInt64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64S Invalid Value Error: %@", err); + [cluster writeAttributeNullableInt64sWithValue:nullableInt64sArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT64S Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82805,7 +82855,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82833,13 +82883,13 @@ class TestCluster : public TestCommandBridge { id nullableInt64sArgument; nullableInt64sArgument = nil; [cluster writeAttributeNullableInt64sWithValue:nullableInt64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64S null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT64S null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82852,7 +82902,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82876,7 +82926,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S null Value & range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82901,7 +82951,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S null Value & not Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82927,13 +82977,13 @@ class TestCluster : public TestCommandBridge { id nullableInt64sArgument; nullableInt64sArgument = [NSNumber numberWithLongLong:-9223372036854775807LL]; [cluster writeAttributeNullableInt64sWithValue:nullableInt64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64S Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT64S Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -82946,7 +82996,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S Value in range Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82971,7 +83021,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_INT64S notValue OK Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82997,13 +83047,13 @@ class TestCluster : public TestCommandBridge { id nullableFloatSingleArgument; nullableFloatSingleArgument = [NSNumber numberWithFloat:0.1f]; [cluster writeAttributeNullableFloatSingleWithValue:nullableFloatSingleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SINGLE medium Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_SINGLE medium Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83016,7 +83066,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SINGLE medium Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83044,13 +83094,13 @@ class TestCluster : public TestCommandBridge { id nullableFloatSingleArgument; nullableFloatSingleArgument = [NSNumber numberWithFloat:INFINITY]; [cluster writeAttributeNullableFloatSingleWithValue:nullableFloatSingleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SINGLE largest Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_SINGLE largest Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83063,7 +83113,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SINGLE largest Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83091,13 +83141,13 @@ class TestCluster : public TestCommandBridge { id nullableFloatSingleArgument; nullableFloatSingleArgument = [NSNumber numberWithFloat:-INFINITY]; [cluster writeAttributeNullableFloatSingleWithValue:nullableFloatSingleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SINGLE smallest Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_SINGLE smallest Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83110,7 +83160,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SINGLE smallest Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83138,13 +83188,13 @@ class TestCluster : public TestCommandBridge { id nullableFloatSingleArgument; nullableFloatSingleArgument = nil; [cluster writeAttributeNullableFloatSingleWithValue:nullableFloatSingleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SINGLE null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_SINGLE null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83157,7 +83207,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SINGLE null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83184,13 +83234,13 @@ class TestCluster : public TestCommandBridge { id nullableFloatSingleArgument; nullableFloatSingleArgument = [NSNumber numberWithFloat:0.0f]; [cluster writeAttributeNullableFloatSingleWithValue:nullableFloatSingleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SINGLE 0 Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_SINGLE 0 Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83203,7 +83253,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatSingleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SINGLE 0 Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83231,13 +83281,13 @@ class TestCluster : public TestCommandBridge { id nullableFloatDoubleArgument; nullableFloatDoubleArgument = [NSNumber numberWithDouble:0.1234567890123]; [cluster writeAttributeNullableFloatDoubleWithValue:nullableFloatDoubleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_DOUBLE medium Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_DOUBLE medium Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83250,7 +83300,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_DOUBLE medium Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83278,13 +83328,13 @@ class TestCluster : public TestCommandBridge { id nullableFloatDoubleArgument; nullableFloatDoubleArgument = [NSNumber numberWithDouble:INFINITY]; [cluster writeAttributeNullableFloatDoubleWithValue:nullableFloatDoubleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_DOUBLE largest Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_DOUBLE largest Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83297,7 +83347,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_DOUBLE largest Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83325,13 +83375,13 @@ class TestCluster : public TestCommandBridge { id nullableFloatDoubleArgument; nullableFloatDoubleArgument = [NSNumber numberWithDouble:-INFINITY]; [cluster writeAttributeNullableFloatDoubleWithValue:nullableFloatDoubleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_DOUBLE smallest Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_DOUBLE smallest Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83344,7 +83394,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_DOUBLE smallest Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83372,13 +83422,13 @@ class TestCluster : public TestCommandBridge { id nullableFloatDoubleArgument; nullableFloatDoubleArgument = nil; [cluster writeAttributeNullableFloatDoubleWithValue:nullableFloatDoubleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_DOUBLE null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_DOUBLE null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83391,7 +83441,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_DOUBLE null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83418,13 +83468,13 @@ class TestCluster : public TestCommandBridge { id nullableFloatDoubleArgument; nullableFloatDoubleArgument = [NSNumber numberWithDouble:0]; [cluster writeAttributeNullableFloatDoubleWithValue:nullableFloatDoubleArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_DOUBLE 0 Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_DOUBLE 0 Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83437,7 +83487,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableFloatDoubleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_DOUBLE 0 Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83465,13 +83515,13 @@ class TestCluster : public TestCommandBridge { id nullableEnum8Argument; nullableEnum8Argument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableEnum8WithValue:nullableEnum8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM8 Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_ENUM8 Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83484,7 +83534,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM8 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83512,13 +83562,13 @@ class TestCluster : public TestCommandBridge { id nullableEnum8Argument; nullableEnum8Argument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableEnum8WithValue:nullableEnum8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM8 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_ENUM8 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83531,7 +83581,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM8 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83558,18 +83608,18 @@ class TestCluster : public TestCommandBridge { id nullableEnum8Argument; nullableEnum8Argument = [NSNumber numberWithUnsignedChar:255U]; - [cluster - writeAttributeNullableEnum8WithValue:nullableEnum8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM8 Invalid Value Error: %@", err); + [cluster writeAttributeNullableEnum8WithValue:nullableEnum8Argument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_ENUM8 Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83582,7 +83632,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM8 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83610,13 +83660,13 @@ class TestCluster : public TestCommandBridge { id nullableEnum8Argument; nullableEnum8Argument = nil; [cluster writeAttributeNullableEnum8WithValue:nullableEnum8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM8 null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_ENUM8 null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83629,7 +83679,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM8 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83656,13 +83706,13 @@ class TestCluster : public TestCommandBridge { id nullableEnum16Argument; nullableEnum16Argument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeNullableEnum16WithValue:nullableEnum16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM16 Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_ENUM16 Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83675,7 +83725,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM16 Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83703,13 +83753,13 @@ class TestCluster : public TestCommandBridge { id nullableEnum16Argument; nullableEnum16Argument = [NSNumber numberWithUnsignedShort:65534U]; [cluster writeAttributeNullableEnum16WithValue:nullableEnum16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM16 Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_ENUM16 Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83722,7 +83772,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM16 Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83749,18 +83799,18 @@ class TestCluster : public TestCommandBridge { id nullableEnum16Argument; nullableEnum16Argument = [NSNumber numberWithUnsignedShort:65535U]; - [cluster - writeAttributeNullableEnum16WithValue:nullableEnum16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM16 Invalid Value Error: %@", err); + [cluster writeAttributeNullableEnum16WithValue:nullableEnum16Argument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_ENUM16 Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83773,7 +83823,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM16 unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83801,13 +83851,13 @@ class TestCluster : public TestCommandBridge { id nullableEnum16Argument; nullableEnum16Argument = nil; [cluster writeAttributeNullableEnum16WithValue:nullableEnum16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM16 null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_ENUM16 null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83820,7 +83870,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_ENUM16 null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83847,13 +83897,13 @@ class TestCluster : public TestCommandBridge { id nullableEnumAttrArgument; nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM Min Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM Min Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83866,7 +83916,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SIMPLE_ENUM Min Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83894,13 +83944,13 @@ class TestCluster : public TestCommandBridge { id nullableEnumAttrArgument; nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM Max Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM Max Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83913,7 +83963,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SIMPLE_ENUM Max Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83940,18 +83990,18 @@ class TestCluster : public TestCommandBridge { id nullableEnumAttrArgument; nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:255U]; - [cluster - writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM Invalid Value Error: %@", err); + [cluster writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM Invalid Value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -83965,7 +84015,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SIMPLE_ENUM unchanged Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -83996,13 +84046,13 @@ class TestCluster : public TestCommandBridge { id nullableEnumAttrArgument; nullableEnumAttrArgument = nil; [cluster writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM null Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM null Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84015,7 +84065,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SIMPLE_ENUM null Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84039,7 +84089,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableEnumAttrWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_SIMPLE_ENUM not 3 Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84062,7 +84112,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_OCTET_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84091,13 +84141,13 @@ class TestCluster : public TestCommandBridge { id nullableOctetStringArgument; nullableOctetStringArgument = [[NSData alloc] initWithBytes:"TestValue" length:9]; [cluster writeAttributeNullableOctetStringWithValue:nullableOctetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_OCTET_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_OCTET_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84111,7 +84161,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84143,13 +84193,13 @@ class TestCluster : public TestCommandBridge { id nullableOctetStringArgument; nullableOctetStringArgument = nil; [cluster writeAttributeNullableOctetStringWithValue:nullableOctetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_OCTET_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_OCTET_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84162,7 +84212,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84189,13 +84239,13 @@ class TestCluster : public TestCommandBridge { id nullableOctetStringArgument; nullableOctetStringArgument = [[NSData alloc] initWithBytes:"" length:0]; [cluster writeAttributeNullableOctetStringWithValue:nullableOctetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_OCTET_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_OCTET_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84208,7 +84258,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_OCTET_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84234,7 +84284,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_OCTET_STRING not TestValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84257,7 +84307,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84285,13 +84335,13 @@ class TestCluster : public TestCommandBridge { id nullableCharStringArgument; nullableCharStringArgument = @"☉T☉"; [cluster writeAttributeNullableCharStringWithValue:nullableCharStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_CHAR_STRING Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_CHAR_STRING Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84305,7 +84355,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84333,7 +84383,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84365,13 +84415,13 @@ class TestCluster : public TestCommandBridge { id nullableCharStringArgument; nullableCharStringArgument = nil; [cluster writeAttributeNullableCharStringWithValue:nullableCharStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_CHAR_STRING - Value too long Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_CHAR_STRING - Value too long Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84384,7 +84434,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84411,13 +84461,13 @@ class TestCluster : public TestCommandBridge { id nullableCharStringArgument; nullableCharStringArgument = @""; [cluster writeAttributeNullableCharStringWithValue:nullableCharStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_CHAR_STRING - Empty Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_CHAR_STRING - Empty Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84430,7 +84480,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84455,7 +84505,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute NULLABLE_CHAR_STRING not ☉T☉ Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84478,7 +84528,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute from nonexistent endpoint. Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -84498,7 +84548,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute from nonexistent cluster. Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -84519,20 +84569,20 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init]; - [cluster - testSimpleOptionalArgumentRequestWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"Send a command that takes an optional parameter but do not set it. Error: %@", err); + [cluster testSimpleOptionalArgumentRequestWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Send a command that takes an optional parameter but do not set it. " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_VALUE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_VALUE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84547,16 +84597,16 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams alloc] init]; params.arg1 = [NSNumber numberWithBool:1]; - [cluster - testSimpleOptionalArgumentRequestWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"Send a command that takes an optional parameter but do not set it. Error: %@", err); + [cluster testSimpleOptionalArgumentRequestWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Send a command that takes an optional parameter but do not set it. " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84643,13 +84693,13 @@ class TestCluster : public TestCommandBridge { listInt8uArgument = temp_0; } [cluster writeAttributeListInt8uWithValue:listInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write subscribed-to list attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write subscribed-to list attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84690,7 +84740,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read range-restricted unsigned 8-bit integer Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84718,17 +84768,18 @@ class TestCluster : public TestCommandBridge { rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min value to a range-restricted unsigned 8-bit integer Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min value to a range-restricted unsigned 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84744,19 +84795,19 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:19U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a range-restricted unsigned 8-bit integer " - @"Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a range-restricted unsigned 8-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84772,19 +84823,19 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:101U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a range-restricted unsigned 8-bit integer " - @"Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a range-restricted unsigned 8-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84801,17 +84852,18 @@ class TestCluster : public TestCommandBridge { rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max value to a range-restricted unsigned 8-bit integer Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max value to a range-restricted unsigned 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84824,7 +84876,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted unsigned 8-bit integer value has not changed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84850,16 +84902,16 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:20U]; - [cluster - writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"Write min valid value to a range-restricted unsigned 8-bit integer Error: %@", err); + [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a range-restricted unsigned 8-bit integer " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84872,7 +84924,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted unsigned 8-bit integer value is at min valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84898,16 +84950,16 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:100U]; - [cluster - writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"Write max valid value to a range-restricted unsigned 8-bit integer Error: %@", err); + [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a range-restricted unsigned 8-bit integer " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84920,7 +84972,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted unsigned 8-bit integer value is at max valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84946,16 +84998,16 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt8uArgument; rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:50U]; - [cluster - writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a range-restricted unsigned 8-bit integer Error: %@", - err); + [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a range-restricted unsigned 8-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -84968,7 +85020,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted unsigned 8-bit integer value is at mid valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84992,7 +85044,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read range-restricted unsigned 16-bit integer Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85020,17 +85072,18 @@ class TestCluster : public TestCommandBridge { rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min value to a range-restricted unsigned 16-bit integer Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min value to a range-restricted unsigned 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85046,19 +85099,19 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:99U]; [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a range-restricted unsigned 16-bit integer " - @"Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a range-restricted unsigned 16-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85074,19 +85127,19 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1001U]; [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a range-restricted unsigned 16-bit integer " - @"Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a range-restricted unsigned 16-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85103,17 +85156,18 @@ class TestCluster : public TestCommandBridge { rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:65535U]; [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max value to a range-restricted unsigned 16-bit integer Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max value to a range-restricted unsigned 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85126,7 +85180,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted unsigned 16-bit integer value has not changed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85152,16 +85206,16 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:100U]; - [cluster - writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a range-restricted unsigned 16-bit integer Error: %@", - err); + [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a range-restricted unsigned 16-bit integer " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85174,7 +85228,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted unsigned 16-bit integer value is at min valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85200,16 +85254,16 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1000U]; - [cluster - writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a range-restricted unsigned 16-bit integer Error: %@", - err); + [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a range-restricted unsigned 16-bit integer " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85222,7 +85276,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted unsigned 16-bit integer value is at max valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85248,17 +85302,16 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt16uArgument; rangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:500U]; - [cluster - writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"Write middle valid value to a range-restricted unsigned 16-bit integer Error: %@", - err); + [cluster writeAttributeRangeRestrictedInt16uWithValue:rangeRestrictedInt16uArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a range-restricted unsigned 16-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85271,7 +85324,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted unsigned 16-bit integer value is at mid valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85295,7 +85348,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read range-restricted signed 8-bit integer Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85322,17 +85375,18 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:-128]; [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min value to a range-restricted signed 8-bit integer Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min value to a range-restricted signed 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85347,21 +85401,20 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:-41]; - [cluster - writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"Write just-below-range value to a range-restricted signed 8-bit integer Error: %@", - err); + [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a range-restricted signed 8-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85376,21 +85429,20 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:51]; - [cluster - writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"Write just-above-range value to a range-restricted signed 8-bit integer Error: %@", - err); + [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a range-restricted signed 8-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85406,17 +85458,18 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:127]; [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max value to a range-restricted signed 8-bit integer Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max value to a range-restricted signed 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85429,7 +85482,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted signed 8-bit integer value has not changed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85457,13 +85510,15 @@ class TestCluster : public TestCommandBridge { rangeRestrictedInt8sArgument = [NSNumber numberWithChar:-40]; [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a range-restricted signed 8-bit integer Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog( + @"Write min valid value to a range-restricted signed 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85476,7 +85531,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted signed 8-bit integer value is at min valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85504,13 +85559,15 @@ class TestCluster : public TestCommandBridge { rangeRestrictedInt8sArgument = [NSNumber numberWithChar:50]; [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a range-restricted signed 8-bit integer Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog( + @"Write max valid value to a range-restricted signed 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85523,7 +85580,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted signed 8-bit integer value is at max valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85549,16 +85606,16 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt8sArgument; rangeRestrictedInt8sArgument = [NSNumber numberWithChar:6]; - [cluster - writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a range-restricted signed 8-bit integer Error: %@", - err); + [cluster writeAttributeRangeRestrictedInt8sWithValue:rangeRestrictedInt8sArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a range-restricted signed 8-bit integer " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85571,7 +85628,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted signed 8-bit integer value is at mid valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85595,7 +85652,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read range-restricted signed 16-bit integer Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85623,17 +85680,18 @@ class TestCluster : public TestCommandBridge { rangeRestrictedInt16sArgument = [NSNumber numberWithShort:-32768]; [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min value to a range-restricted signed 16-bit integer Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min value to a range-restricted signed 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85649,19 +85707,19 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:-151]; [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a range-restricted signed 16-bit integer " - @"Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a range-restricted signed 16-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85677,19 +85735,19 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:201]; [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a range-restricted signed 16-bit integer " - @"Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a range-restricted signed 16-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85706,17 +85764,18 @@ class TestCluster : public TestCommandBridge { rangeRestrictedInt16sArgument = [NSNumber numberWithShort:32767]; [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max value to a range-restricted signed 16-bit integer Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max value to a range-restricted signed 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85729,7 +85788,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted signed 16-bit integer value has not changed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85755,16 +85814,16 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:-150]; - [cluster - writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"Write min valid value to a range-restricted signed 16-bit integer Error: %@", err); + [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a range-restricted signed 16-bit integer " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85777,7 +85836,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted signed 16-bit integer value is at min valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85803,16 +85862,16 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:200]; - [cluster - writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"Write max valid value to a range-restricted signed 16-bit integer Error: %@", err); + [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a range-restricted signed 16-bit integer " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85825,7 +85884,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted signed 16-bit integer value is at max valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85851,16 +85910,16 @@ class TestCluster : public TestCommandBridge { id rangeRestrictedInt16sArgument; rangeRestrictedInt16sArgument = [NSNumber numberWithShort:7]; - [cluster - writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a range-restricted signed 16-bit integer Error: %@", - err); + [cluster writeAttributeRangeRestrictedInt16sWithValue:rangeRestrictedInt16sArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a range-restricted signed 16-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85873,7 +85932,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify range-restricted signed 16-bit integer value is at mid valid Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85897,20 +85956,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read nullable range-restricted unsigned 8-bit integer Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read nullable range-restricted unsigned 8-bit integer Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 70U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 70U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85926,19 +85984,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min value to a nullable range-restricted unsigned 8-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min value to a nullable range-restricted unsigned " + @"8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85954,19 +86012,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:19U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a nullable range-restricted " - @"unsigned 8-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a nullable range-restricted " + @"unsigned 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -85982,19 +86040,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:101U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a nullable range-restricted " - @"unsigned 8-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a nullable range-restricted " + @"unsigned 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86010,19 +86068,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max value to a nullable range-restricted unsigned 8-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max value to a nullable range-restricted unsigned " + @"8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86035,20 +86093,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value has not changed Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value has not changed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 70U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 70U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86064,15 +86121,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:20U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a nullable range-restricted unsigned 8-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a nullable range-restricted " + @"unsigned 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86085,20 +86142,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at min valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at min valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 20U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 20U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86114,15 +86170,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:100U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a nullable range-restricted unsigned 8-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a nullable range-restricted " + @"unsigned 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86135,20 +86191,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at max valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at max valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 100U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 100U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86164,15 +86219,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:50U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a nullable range-restricted unsigned " - @"8-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a nullable range-restricted " + @"unsigned 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86185,20 +86240,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at mid valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is at mid valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 50U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 50U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86214,15 +86268,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8uArgument; nullableRangeRestrictedInt8uArgument = nil; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write null value to a nullable range-restricted unsigned 8-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write null value to a nullable range-restricted unsigned " + @"8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86235,19 +86289,18 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is null Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 8-bit integer value is null Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNull("nullable_range_restricted_int8u", actualValue)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNull("nullable_range_restricted_int8u", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86260,20 +86313,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read nullable range-restricted unsigned 16-bit integer Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read nullable range-restricted unsigned 16-bit integer Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int16u", actualValue, 200U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16u", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int16u", actualValue, 200U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86289,19 +86341,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min value to a nullable range-restricted unsigned 16-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min value to a nullable range-restricted unsigned " + @"16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86317,19 +86369,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:99U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a nullable range-restricted " - @"unsigned 16-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a nullable range-restricted " + @"unsigned 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86345,19 +86397,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1001U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a nullable range-restricted " - @"unsigned 16-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a nullable range-restricted " + @"unsigned 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86373,19 +86425,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:65534U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max value to a nullable range-restricted unsigned 16-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max value to a nullable range-restricted unsigned " + @"16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86398,20 +86450,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value has not changed Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value has not changed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int16u", actualValue, 200U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16u", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int16u", actualValue, 200U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86427,15 +86478,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:100U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a nullable range-restricted unsigned " - @"16-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a nullable range-restricted " + @"unsigned 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86448,20 +86499,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at min valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at min valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int16u", actualValue, 100U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16u", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int16u", actualValue, 100U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86477,15 +86527,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:1000U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a nullable range-restricted unsigned " - @"16-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a nullable range-restricted " + @"unsigned 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86498,20 +86548,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at max valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at max valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int16u", actualValue, 1000U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16u", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int16u", actualValue, 1000U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86527,15 +86576,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = [NSNumber numberWithUnsignedShort:500U]; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a nullable range-restricted unsigned " - @"16-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a nullable range-restricted " + @"unsigned 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86548,20 +86597,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at mid valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is at mid valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int16u", actualValue, 500U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16u", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int16u", actualValue, 500U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86577,15 +86625,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16uArgument; nullableRangeRestrictedInt16uArgument = nil; [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:nullableRangeRestrictedInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write null value to a nullable range-restricted unsigned 16-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write null value to a nullable range-restricted unsigned " + @"16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86598,19 +86646,18 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is null Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted unsigned 16-bit integer value is null Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNull("nullable_range_restricted_int16u", actualValue)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNull("nullable_range_restricted_int16u", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86623,20 +86670,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read nullable range-restricted signed 8-bit integer Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read nullable range-restricted signed 8-bit integer Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8s", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8s", actualValue, -20)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8s", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8s", actualValue, -20)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86652,19 +86698,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:-127]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min value to a nullable range-restricted signed 8-bit integer " - @"Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min value to a nullable range-restricted signed 8-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86680,19 +86726,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:-41]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a nullable range-restricted signed " - @"8-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a nullable range-restricted " + @"signed 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86708,19 +86754,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:51]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a nullable range-restricted signed " - @"8-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a nullable range-restricted " + @"signed 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86736,19 +86782,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:127]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max value to a nullable range-restricted signed 8-bit integer " - @"Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max value to a nullable range-restricted signed 8-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86761,20 +86807,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 8-bit integer value has not changed Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 8-bit integer value has not changed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8s", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8s", actualValue, -20)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8s", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8s", actualValue, -20)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86790,15 +86835,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:-40]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a nullable range-restricted signed 8-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a nullable range-restricted signed " + @"8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86811,20 +86856,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at min valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at min valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8s", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8s", actualValue, -40)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8s", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8s", actualValue, -40)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86840,15 +86884,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:50]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a nullable range-restricted signed 8-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a nullable range-restricted signed " + @"8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86861,20 +86905,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at max valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at max valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8s", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8s", actualValue, 50)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8s", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8s", actualValue, 50)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86890,15 +86933,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = [NSNumber numberWithChar:6]; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a nullable range-restricted signed " - @"8-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a nullable range-restricted " + @"signed 8-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86911,20 +86954,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at mid valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at mid valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8s", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8s", actualValue, 6)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8s", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8s", actualValue, 6)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86940,15 +86982,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt8sArgument; nullableRangeRestrictedInt8sArgument = nil; [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:nullableRangeRestrictedInt8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write null value to a nullable range-restricted signed 8-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write null value to a nullable range-restricted signed 8-bit " + @"integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86961,19 +87003,18 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at null Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 8-bit integer value is at null Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNull("nullable_range_restricted_int8s", actualValue)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNull("nullable_range_restricted_int8s", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -86986,20 +87027,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read nullable range-restricted signed 16-bit integer Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read nullable range-restricted signed 16-bit integer Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16s", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int16s", actualValue, -100)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16s", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int16s", actualValue, -100)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87015,19 +87055,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:-32767]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min value to a nullable range-restricted signed 16-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min value to a nullable range-restricted signed " + @"16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87043,19 +87083,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:-151]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-below-range value to a nullable range-restricted signed " - @"16-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-below-range value to a nullable range-restricted " + @"signed 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87071,19 +87111,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:201]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write just-above-range value to a nullable range-restricted signed " - @"16-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write just-above-range value to a nullable range-restricted " + @"signed 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87099,19 +87139,19 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:32767]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max value to a nullable range-restricted signed 16-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max value to a nullable range-restricted signed " + @"16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87124,20 +87164,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 16-bit integer value has not changed Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 16-bit integer value has not changed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16s", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int16s", actualValue, -100)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16s", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int16s", actualValue, -100)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87153,15 +87192,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:-150]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write min valid value to a nullable range-restricted signed 16-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write min valid value to a nullable range-restricted signed " + @"16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87174,20 +87213,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at min valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at min valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16s", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int16s", actualValue, -150)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16s", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int16s", actualValue, -150)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87203,15 +87241,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:200]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write max valid value to a nullable range-restricted signed 16-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write max valid value to a nullable range-restricted signed " + @"16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87224,20 +87262,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at max valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at max valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16s", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int16s", actualValue, 200)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16s", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int16s", actualValue, 200)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87253,15 +87290,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = [NSNumber numberWithShort:7]; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write middle valid value to a nullable range-restricted signed " - @"16-bit integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write middle valid value to a nullable range-restricted " + @"signed 16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87274,20 +87311,19 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at mid valid Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 16-bit integer value is at mid valid Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16s", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int16s", actualValue, 7)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int16s", actualValue)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int16s", actualValue, 7)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87303,15 +87339,15 @@ class TestCluster : public TestCommandBridge { id nullableRangeRestrictedInt16sArgument; nullableRangeRestrictedInt16sArgument = nil; [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:nullableRangeRestrictedInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write null value to a nullable range-restricted signed 16-bit " - @"integer Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write null value to a nullable range-restricted signed " + @"16-bit integer Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87324,19 +87360,18 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify nullable range-restricted signed 16-bit integer value is null Error: %@", err); + [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify nullable range-restricted signed 16-bit integer value is null Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNull("nullable_range_restricted_int16s", actualValue)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNull("nullable_range_restricted_int16s", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87352,17 +87387,17 @@ class TestCluster : public TestCommandBridge { id generalErrorBooleanArgument; generalErrorBooleanArgument = [NSNumber numberWithBool:false]; [cluster writeAttributeGeneralErrorBooleanWithValue:generalErrorBooleanArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute that returns general status on write Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_DATA_TYPE)); - NextTest(); - }]; + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute that returns general status on write Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_DATA_TYPE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87379,17 +87414,18 @@ class TestCluster : public TestCommandBridge { clusterErrorBooleanArgument = [NSNumber numberWithBool:false]; [cluster writeAttributeClusterErrorBooleanWithValue:clusterErrorBooleanArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute that returns cluster-specific status on write Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute that returns cluster-specific status on write Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87402,7 +87438,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneralErrorBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneralErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute that returns general status on read Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -87422,7 +87458,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterErrorBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"read attribute that returns cluster-specific status on read Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -87442,7 +87478,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"read AcceptedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -87484,7 +87520,7 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"read GeneratedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -87529,13 +87565,13 @@ class TestCluster : public TestCommandBridge { ((MTRTestClusterClusterSimpleStruct *) structAttrArgument).h = [NSNumber numberWithDouble:3.14159265358979]; [cluster writeAttributeStructAttrWithValue:structAttrArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write struct-typed attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write struct-typed attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87548,27 +87584,27 @@ class TestCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStructAttrWithCompletionHandler:^( - MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read struct-typed attribute Error: %@", err); + [cluster + readAttributeStructAttrWithCompletion:^(MTRTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read struct-typed attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("a", ((MTRTestClusterClusterSimpleStruct *) actualValue).a, 5U)); - VerifyOrReturn(CheckValue("b", ((MTRTestClusterClusterSimpleStruct *) actualValue).b, true)); - VerifyOrReturn(CheckValue("c", ((MTRTestClusterClusterSimpleStruct *) actualValue).c, 2U)); - VerifyOrReturn(CheckValueAsString( - "d", ((MTRTestClusterClusterSimpleStruct *) actualValue).d, [[NSData alloc] initWithBytes:"abc" length:3])); - VerifyOrReturn(CheckValueAsString("e", ((MTRTestClusterClusterSimpleStruct *) actualValue).e, @"")); - VerifyOrReturn(CheckValue("f", ((MTRTestClusterClusterSimpleStruct *) actualValue).f, 17U)); - VerifyOrReturn(CheckValue("g", ((MTRTestClusterClusterSimpleStruct *) actualValue).g, 1.5f)); - VerifyOrReturn(CheckValue("h", ((MTRTestClusterClusterSimpleStruct *) actualValue).h, 3.14159265358979)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("a", ((MTRTestClusterClusterSimpleStruct *) actualValue).a, 5U)); + VerifyOrReturn(CheckValue("b", ((MTRTestClusterClusterSimpleStruct *) actualValue).b, true)); + VerifyOrReturn(CheckValue("c", ((MTRTestClusterClusterSimpleStruct *) actualValue).c, 2U)); + VerifyOrReturn(CheckValueAsString( + "d", ((MTRTestClusterClusterSimpleStruct *) actualValue).d, [[NSData alloc] initWithBytes:"abc" length:3])); + VerifyOrReturn(CheckValueAsString("e", ((MTRTestClusterClusterSimpleStruct *) actualValue).e, @"")); + VerifyOrReturn(CheckValue("f", ((MTRTestClusterClusterSimpleStruct *) actualValue).f, 17U)); + VerifyOrReturn(CheckValue("g", ((MTRTestClusterClusterSimpleStruct *) actualValue).g, 1.5f)); + VerifyOrReturn(CheckValue("h", ((MTRTestClusterClusterSimpleStruct *) actualValue).h, 3.14159265358979)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87901,13 +87937,13 @@ class TestConstraints : public TestCommandBridge { listInt8uArgument = temp_0; } [cluster writeAttributeListInt8uWithValue:listInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute LIST With List of INT8U Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute LIST With List of INT8U Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87920,7 +87956,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LIST With Partial List of INT8U that should be in it Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -87943,7 +87979,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute LIST With Partial List of INT8U that should not be included Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -87971,13 +88007,13 @@ class TestConstraints : public TestCommandBridge { listInt8uArgument = temp_0; } [cluster writeAttributeListInt8uWithValue:listInt8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute LIST Back to Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute LIST Back to Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -87990,7 +88026,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88017,13 +88053,13 @@ class TestConstraints : public TestCommandBridge { id bitmap32Argument; bitmap32Argument = [NSNumber numberWithUnsignedInt:5UL]; [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 with MaskVal1 and MaskVal3 Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP32 with MaskVal1 and MaskVal3 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -88036,7 +88072,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal2 is not set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88060,7 +88096,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal1 is set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88084,7 +88120,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure MaskVal3 is set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88108,7 +88144,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 with MaskVal1 and MaskVal3 and ensure Maskval1 and MaskVal3 are set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88135,13 +88171,13 @@ class TestConstraints : public TestCommandBridge { id int32uArgument; int32uArgument = [NSNumber numberWithUnsignedInt:5UL]; [cluster writeAttributeInt32uWithValue:int32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32U Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -88154,7 +88190,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Value MinValue Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88175,7 +88211,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Value MaxValue Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88196,7 +88232,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Value NotValue Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88220,13 +88256,13 @@ class TestConstraints : public TestCommandBridge { id int32uArgument; int32uArgument = [NSNumber numberWithUnsignedInt:0UL]; [cluster writeAttributeInt32uWithValue:int32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Value Back to Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32U Value Back to Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -88242,13 +88278,13 @@ class TestConstraints : public TestCommandBridge { id charStringArgument; charStringArgument = @"** Test **"; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -88261,7 +88297,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value MinLength Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88281,7 +88317,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value MaxLength Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88301,7 +88337,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value StartsWith Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88321,7 +88357,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value EndsWith Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88344,13 +88380,13 @@ class TestConstraints : public TestCommandBridge { id charStringArgument; charStringArgument = @"lowercase"; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -88363,7 +88399,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88387,13 +88423,13 @@ class TestConstraints : public TestCommandBridge { id charStringArgument; charStringArgument = @"UPPERCASE"; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -88406,7 +88442,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88430,13 +88466,13 @@ class TestConstraints : public TestCommandBridge { id charStringArgument; charStringArgument = @"lowUPPER"; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -88449,7 +88485,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value isLowerCase/isUpperCase Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88473,13 +88509,13 @@ class TestConstraints : public TestCommandBridge { id charStringArgument; charStringArgument = @"ABCDEF012V"; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -88492,7 +88528,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value isHexString Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88515,13 +88551,13 @@ class TestConstraints : public TestCommandBridge { id charStringArgument; charStringArgument = @"ABCDEF0123"; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -88534,7 +88570,7 @@ class TestConstraints : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute CHAR_STRING Value isHexString Constraints Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -88557,13 +88593,13 @@ class TestConstraints : public TestCommandBridge { id charStringArgument; charStringArgument = @""; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute CHAR_STRING Value Back to Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute CHAR_STRING Value Back to Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -89644,22 +89680,22 @@ class TestSaveAs : public TestCommandBridge { params.arg1 = [NSNumber numberWithUnsignedChar:3U]; params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Add Arguments Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); - } - { - TestAddArgumentDefaultValue = values.returnValue; - } + { + id actualValue = values.returnValue; + VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); + } + { + TestAddArgumentDefaultValue = values.returnValue; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -89676,19 +89712,19 @@ class TestSaveAs : public TestCommandBridge { params.arg1 = [NSNumber numberWithUnsignedChar:3U]; params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Add Arguments Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, TestAddArgumentDefaultValue)); - } + { + id actualValue = values.returnValue; + VerifyOrReturn(CheckValue("returnValue", actualValue, TestAddArgumentDefaultValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -89704,18 +89740,18 @@ class TestSaveAs : public TestCommandBridge { __auto_type * params = [[MTRTestClusterClusterTestAddArgumentsParams alloc] init]; params.arg1 = [NSNumber numberWithUnsignedChar:3U]; params.arg2 = [TestAddArgumentDefaultValue copy]; - [cluster - testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + [cluster testAddArgumentsWithParams:params + completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Add Arguments Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintNotValue("returnValue", values.returnValue, TestAddArgumentDefaultValue)); + VerifyOrReturn( + CheckConstraintNotValue("returnValue", values.returnValue, TestAddArgumentDefaultValue)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -89729,7 +89765,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89759,13 +89795,13 @@ class TestSaveAs : public TestCommandBridge { id booleanArgument; booleanArgument = [NSNumber numberWithBool:1]; [cluster writeAttributeBooleanWithValue:booleanArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BOOLEAN Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BOOLEAN Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -89778,7 +89814,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89802,13 +89838,13 @@ class TestSaveAs : public TestCommandBridge { id booleanArgument; booleanArgument = [readAttributeBooleanDefaultValue copy]; [cluster writeAttributeBooleanWithValue:booleanArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BOOLEAN DefaultValue Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BOOLEAN DefaultValue Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -89821,7 +89857,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBooleanWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BOOLEAN False Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89846,7 +89882,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89876,13 +89912,13 @@ class TestSaveAs : public TestCommandBridge { id bitmap8Argument; bitmap8Argument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP8 Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP8 Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -89895,7 +89931,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89919,13 +89955,13 @@ class TestSaveAs : public TestCommandBridge { id bitmap8Argument; bitmap8Argument = [readAttributeBitmap8DefaultValue copy]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP8 Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP8 Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -89938,7 +89974,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89963,7 +89999,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -89993,13 +90029,13 @@ class TestSaveAs : public TestCommandBridge { id bitmap16Argument; bitmap16Argument = [NSNumber numberWithUnsignedShort:1U]; [cluster writeAttributeBitmap16WithValue:bitmap16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP16 Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP16 Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90012,7 +90048,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90036,13 +90072,13 @@ class TestSaveAs : public TestCommandBridge { id bitmap16Argument; bitmap16Argument = [readAttributeBitmap16DefaultValue copy]; [cluster writeAttributeBitmap16WithValue:bitmap16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP16 Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP16 Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90055,7 +90091,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90080,7 +90116,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90110,13 +90146,13 @@ class TestSaveAs : public TestCommandBridge { id bitmap32Argument; bitmap32Argument = [NSNumber numberWithUnsignedInt:1UL]; [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP32 Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90129,7 +90165,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90153,13 +90189,13 @@ class TestSaveAs : public TestCommandBridge { id bitmap32Argument; bitmap32Argument = [readAttributeBitmap32DefaultValue copy]; [cluster writeAttributeBitmap32WithValue:bitmap32Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP32 Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP32 Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90172,7 +90208,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap32WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP32 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90197,7 +90233,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90227,13 +90263,13 @@ class TestSaveAs : public TestCommandBridge { id bitmap64Argument; bitmap64Argument = [NSNumber numberWithUnsignedLongLong:1ULL]; [cluster writeAttributeBitmap64WithValue:bitmap64Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP64 Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP64 Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90246,7 +90282,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90270,13 +90306,13 @@ class TestSaveAs : public TestCommandBridge { id bitmap64Argument; bitmap64Argument = [readAttributeBitmap64DefaultValue copy]; [cluster writeAttributeBitmap64WithValue:bitmap64Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute BITMAP64 Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute BITMAP64 Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90289,7 +90325,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBitmap64WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute BITMAP64 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90314,7 +90350,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90344,13 +90380,13 @@ class TestSaveAs : public TestCommandBridge { id int8uArgument; int8uArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeInt8uWithValue:int8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8U Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8U Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90363,7 +90399,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90387,13 +90423,13 @@ class TestSaveAs : public TestCommandBridge { id int8uArgument; int8uArgument = [readAttributeInt8uDefaultValue copy]; [cluster writeAttributeInt8uWithValue:int8uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8U Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8U Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90406,7 +90442,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90431,7 +90467,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90461,13 +90497,13 @@ class TestSaveAs : public TestCommandBridge { id int16uArgument; int16uArgument = [NSNumber numberWithUnsignedShort:1U]; [cluster writeAttributeInt16uWithValue:int16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16U Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16U Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90480,7 +90516,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90504,13 +90540,13 @@ class TestSaveAs : public TestCommandBridge { id int16uArgument; int16uArgument = [readAttributeInt16uDefaultValue copy]; [cluster writeAttributeInt16uWithValue:int16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16U Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16U Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90523,7 +90559,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90548,7 +90584,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90578,13 +90614,13 @@ class TestSaveAs : public TestCommandBridge { id int32uArgument; int32uArgument = [NSNumber numberWithUnsignedInt:1UL]; [cluster writeAttributeInt32uWithValue:int32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32U Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90597,7 +90633,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90621,13 +90657,13 @@ class TestSaveAs : public TestCommandBridge { id int32uArgument; int32uArgument = [readAttributeInt32uDefaultValue copy]; [cluster writeAttributeInt32uWithValue:int32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32U Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32U Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90640,7 +90676,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90665,7 +90701,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90695,13 +90731,13 @@ class TestSaveAs : public TestCommandBridge { id int64uArgument; int64uArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; [cluster writeAttributeInt64uWithValue:int64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64U Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT64U Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90714,7 +90750,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90738,13 +90774,13 @@ class TestSaveAs : public TestCommandBridge { id int64uArgument; int64uArgument = [readAttributeInt64uDefaultValue copy]; [cluster writeAttributeInt64uWithValue:int64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64U Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT64U Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90757,7 +90793,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64uWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64U Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90782,7 +90818,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90812,13 +90848,13 @@ class TestSaveAs : public TestCommandBridge { id int8sArgument; int8sArgument = [NSNumber numberWithChar:1]; [cluster writeAttributeInt8sWithValue:int8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8S Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90831,7 +90867,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90855,13 +90891,13 @@ class TestSaveAs : public TestCommandBridge { id int8sArgument; int8sArgument = [readAttributeInt8sDefaultValue copy]; [cluster writeAttributeInt8sWithValue:int8sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT8S Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT8S Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90874,7 +90910,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt8sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT8S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90899,7 +90935,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90929,13 +90965,13 @@ class TestSaveAs : public TestCommandBridge { id int16sArgument; int16sArgument = [NSNumber numberWithShort:1]; [cluster writeAttributeInt16sWithValue:int16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16S Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90948,7 +90984,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -90972,13 +91008,13 @@ class TestSaveAs : public TestCommandBridge { id int16sArgument; int16sArgument = [readAttributeInt16sDefaultValue copy]; [cluster writeAttributeInt16sWithValue:int16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT16S Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT16S Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -90991,7 +91027,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt16sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT16S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91016,7 +91052,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91046,13 +91082,13 @@ class TestSaveAs : public TestCommandBridge { id int32sArgument; int32sArgument = [NSNumber numberWithInt:1L]; [cluster writeAttributeInt32sWithValue:int32sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32S Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91065,7 +91101,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91089,13 +91125,13 @@ class TestSaveAs : public TestCommandBridge { id int32sArgument; int32sArgument = [readAttributeInt32sDefaultValue copy]; [cluster writeAttributeInt32sWithValue:int32sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT32S Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT32S Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91108,7 +91144,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt32sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT32S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91133,7 +91169,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91163,13 +91199,13 @@ class TestSaveAs : public TestCommandBridge { id int64sArgument; int64sArgument = [NSNumber numberWithLongLong:1LL]; [cluster writeAttributeInt64sWithValue:int64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INTS Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INTS Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91182,7 +91218,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91206,13 +91242,13 @@ class TestSaveAs : public TestCommandBridge { id int64sArgument; int64sArgument = [readAttributeInt64sDefaultValue copy]; [cluster writeAttributeInt64sWithValue:int64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute INT64S Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute INT64S Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91225,7 +91261,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInt64sWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute INT64S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91250,7 +91286,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91280,13 +91316,13 @@ class TestSaveAs : public TestCommandBridge { id enum8Argument; enum8Argument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeEnum8WithValue:enum8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM8 Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM8 Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91299,7 +91335,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91323,13 +91359,13 @@ class TestSaveAs : public TestCommandBridge { id enum8Argument; enum8Argument = [readAttributeEnum8DefaultValue copy]; [cluster writeAttributeEnum8WithValue:enum8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM8 Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM8 Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91342,7 +91378,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum8WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM8 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91367,7 +91403,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91397,13 +91433,13 @@ class TestSaveAs : public TestCommandBridge { id enum16Argument; enum16Argument = [NSNumber numberWithUnsignedShort:1U]; [cluster writeAttributeEnum16WithValue:enum16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM16 Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM16 Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91416,7 +91452,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91440,13 +91476,13 @@ class TestSaveAs : public TestCommandBridge { id enum16Argument; enum16Argument = [readAttributeEnum16DefaultValue copy]; [cluster writeAttributeEnum16WithValue:enum16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute ENUM16 Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute ENUM16 Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91459,7 +91495,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnum16WithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute ENUM16 Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91484,7 +91520,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91514,13 +91550,13 @@ class TestSaveAs : public TestCommandBridge { id epochUsArgument; epochUsArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; [cluster writeAttributeEpochUsWithValue:epochUsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_US Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute EPOCH_US Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91533,7 +91569,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91557,13 +91593,13 @@ class TestSaveAs : public TestCommandBridge { id epochUsArgument; epochUsArgument = [readAttributeEpochUSDefaultValue copy]; [cluster writeAttributeEpochUsWithValue:epochUsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_US Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute EPOCH_US Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91576,7 +91612,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochUsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_US Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91601,7 +91637,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91631,13 +91667,13 @@ class TestSaveAs : public TestCommandBridge { id epochSArgument; epochSArgument = [NSNumber numberWithUnsignedInt:1UL]; [cluster writeAttributeEpochSWithValue:epochSArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_S Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute EPOCH_S Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91650,7 +91686,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91674,13 +91710,13 @@ class TestSaveAs : public TestCommandBridge { id epochSArgument; epochSArgument = [readAttributeEpochSDefaultValue copy]; [cluster writeAttributeEpochSWithValue:epochSArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute EPOCH_S Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute EPOCH_S Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91693,7 +91729,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEpochSWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute EPOCH_S Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91718,7 +91754,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor_id Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91748,13 +91784,13 @@ class TestSaveAs : public TestCommandBridge { id vendorIdArgument; vendorIdArgument = [NSNumber numberWithUnsignedShort:1U]; [cluster writeAttributeVendorIdWithValue:vendorIdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute vendor_id Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute vendor_id Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91767,7 +91803,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor_id Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91791,13 +91827,13 @@ class TestSaveAs : public TestCommandBridge { id vendorIdArgument; vendorIdArgument = [readAttributeVendorIdDefaultValue copy]; [cluster writeAttributeVendorIdWithValue:vendorIdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute vendor_id Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute vendor_id Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91810,7 +91846,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute vendor_id Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91835,7 +91871,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute char_string Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91862,7 +91898,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute char_string Default Value and compare to saved value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91889,13 +91925,13 @@ class TestSaveAs : public TestCommandBridge { id charStringArgument; charStringArgument = @"NotDefault"; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute char_string Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute char_string Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91909,7 +91945,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute char_string Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91938,7 +91974,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute char_string Not Default Value and compare to saved value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -91967,13 +92003,13 @@ class TestSaveAs : public TestCommandBridge { id charStringArgument; charStringArgument = [readAttributeCharStringNotDefaultValue copy]; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute char_string Not Default Value from saved value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute char_string Not Default Value from saved value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -91986,7 +92022,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute char_string Not Default Value and compare to expected value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92013,13 +92049,13 @@ class TestSaveAs : public TestCommandBridge { id charStringArgument; charStringArgument = [readAttributeCharStringDefaultValue copy]; [cluster writeAttributeCharStringWithValue:charStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute char_string Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute char_string Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -92033,7 +92069,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute octet_string Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92060,7 +92096,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute octet_string Default Value and compare to saved value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92087,13 +92123,13 @@ class TestSaveAs : public TestCommandBridge { id octetStringArgument; octetStringArgument = [[NSData alloc] initWithBytes:"NotDefault" length:10]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute octet_string Not Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute octet_string Not Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -92107,7 +92143,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute octet_string Not Default Value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92137,7 +92173,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute octet_string Not Default Value and compare to saved value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92165,14 +92201,15 @@ class TestSaveAs : public TestCommandBridge { id octetStringArgument; octetStringArgument = [readAttributeOctetStringNotDefaultValue copy]; - [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute octet_string Not Default Value from saved value Error: %@", err); + [cluster + writeAttributeOctetStringWithValue:octetStringArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute octet_string Not Default Value from saved value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -92185,7 +92222,7 @@ class TestSaveAs : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOctetStringWithCompletionHandler:^(NSData * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute octet_string Not Default Value and compare to expected value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92213,13 +92250,13 @@ class TestSaveAs : public TestCommandBridge { id octetStringArgument; octetStringArgument = [readAttributeOctetStringDefaultValue copy]; [cluster writeAttributeOctetStringWithValue:octetStringArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute octet_string Default Value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write attribute octet_string Default Value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -92339,22 +92376,22 @@ class TestConfigVariables : public TestCommandBridge { params.arg1 = [NSNumber numberWithUnsignedChar:3U]; params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Add Arguments Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); - } - { - TestAddArgumentDefaultValue = values.returnValue; - } + { + id actualValue = values.returnValue; + VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); + } + { + TestAddArgumentDefaultValue = values.returnValue; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -92371,20 +92408,20 @@ class TestConfigVariables : public TestCommandBridge { params.arg1 = mArg1.HasValue() ? [NSNumber numberWithUnsignedChar:mArg1.Value()] : [NSNumber numberWithUnsignedChar:5U]; params.arg2 = [TestAddArgumentDefaultValue copy]; [cluster testAddArgumentsWithParams:params - completionHandler:^( - MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Test Add Arguments Command Error: %@", err); + completion:^(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Add Arguments Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, - mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25U)); - } + { + id actualValue = values.returnValue; + VerifyOrReturn(CheckValue("returnValue", actualValue, + mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -92509,7 +92546,7 @@ class TestDescriptorCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDeviceListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDeviceTypeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Device list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92535,7 +92572,7 @@ class TestDescriptorCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeServerListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Server list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92586,7 +92623,7 @@ class TestDescriptorCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClientListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClientListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Client list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92611,7 +92648,7 @@ class TestDescriptorCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePartsListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePartsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read attribute Parts list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92838,7 +92875,7 @@ class TestBasicInformation : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read location Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92863,13 +92900,13 @@ class TestBasicInformation : public TestCommandBridge { id locationArgument; locationArgument = @"US"; [cluster writeAttributeLocationWithValue:locationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write location Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write location Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -92880,7 +92917,7 @@ class TestBasicInformation : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back location Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92905,13 +92942,13 @@ class TestBasicInformation : public TestCommandBridge { id locationArgument; locationArgument = @"XX"; [cluster writeAttributeLocationWithValue:locationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Restore initial location value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Restore initial location value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -92922,7 +92959,7 @@ class TestBasicInformation : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read AttributeList value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92969,7 +93006,7 @@ class TestBasicInformation : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read NodeLabel Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -92994,13 +93031,13 @@ class TestBasicInformation : public TestCommandBridge { id nodeLabelArgument; nodeLabelArgument = @"My node"; [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write NodeLabel Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write NodeLabel Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -93011,7 +93048,7 @@ class TestBasicInformation : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back NodeLabel Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93033,7 +93070,7 @@ class TestBasicInformation : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read LocalConfigDisabled Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93058,13 +93095,13 @@ class TestBasicInformation : public TestCommandBridge { id localConfigDisabledArgument; localConfigDisabledArgument = [NSNumber numberWithBool:true]; [cluster writeAttributeLocalConfigDisabledWithValue:localConfigDisabledArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write LocalConfigDisabled Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write LocalConfigDisabled Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -93075,7 +93112,7 @@ class TestBasicInformation : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back LocalConfigDisabled Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93110,7 +93147,7 @@ class TestBasicInformation : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back NodeLabel after reboot Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93135,13 +93172,13 @@ class TestBasicInformation : public TestCommandBridge { id nodeLabelArgument; nodeLabelArgument = @""; [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Restore initial NodeLabel value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Restore initial NodeLabel value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -93152,7 +93189,7 @@ class TestBasicInformation : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back LocalConfigDisabled after reboot Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93177,13 +93214,13 @@ class TestBasicInformation : public TestCommandBridge { id localConfigDisabledArgument; localConfigDisabledArgument = [NSNumber numberWithBool:false]; [cluster writeAttributeLocalConfigDisabledWithValue:localConfigDisabledArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Restore initial LocalConfigDisabled value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Restore initial LocalConfigDisabled value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -93339,7 +93376,7 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCommissionedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read number of commissioned fabrics Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93364,7 +93401,7 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read current fabric index Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93391,13 +93428,13 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Open commissioning window from alpha Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Open commissioning window from alpha Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -93481,14 +93518,14 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; params.fabricIndex = [ourFabricIndex copy]; [cluster removeFabricWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove single own fabric Error: %@", err); + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Remove single own fabric Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -93805,13 +93842,13 @@ class TestGeneralCommissioning : public TestCommandBridge { id breadcrumbArgument; breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:137438953472ULL]; [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write Breadcrumb (1/2) Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write Breadcrumb (1/2) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -93824,7 +93861,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back Breadcrumb (1/2) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93851,13 +93888,13 @@ class TestGeneralCommissioning : public TestCommandBridge { id breadcrumbArgument; breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:81ULL]; [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write Breadcrumb (2/2) Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write Breadcrumb (2/2) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -93870,7 +93907,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back Breadcrumb (2/2) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93907,7 +93944,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back Breadcrumb after reboot and ensure it was not persisted Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93934,13 +93971,13 @@ class TestGeneralCommissioning : public TestCommandBridge { id breadcrumbArgument; breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:1ULL]; [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Set Breadcrumb to nonzero value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Set Breadcrumb to nonzero value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -93953,7 +93990,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check Breadcrumb set worked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -93977,7 +94014,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster commissioningCompleteWithCompletionHandler:^( + [cluster commissioningCompleteWithCompletion:^( MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Send CommissioningComplete without armed fail-safe Error: %@", err); @@ -94002,7 +94039,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check Breadcrumb was not touched by invalid CommissioningComplete Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94028,13 +94065,13 @@ class TestGeneralCommissioning : public TestCommandBridge { __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Open Commissioning Window from alpha Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94051,19 +94088,19 @@ class TestGeneralCommissioning : public TestCommandBridge { params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:10U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:5000ULL]; [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Try to arm fail-safe Error: %@", err); + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Try to arm fail-safe Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); - } + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94076,7 +94113,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check Breadcrumb was not touched by ArmFailSafe with commissioning window open Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94103,13 +94140,13 @@ class TestGeneralCommissioning : public TestCommandBridge { id breadcrumbArgument; breadcrumbArgument = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster writeAttributeBreadcrumbWithValue:breadcrumbArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Reset Breadcrumb to 0 so we can commission Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Reset Breadcrumb to 0 so we can commission Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94141,19 +94178,19 @@ class TestGeneralCommissioning : public TestCommandBridge { params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:500U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:2ULL]; [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Arm fail-safe Error: %@", err); + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Arm fail-safe Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); - } + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94166,7 +94203,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check Breadcrumb was properly set by ArmFailSafe Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94194,19 +94231,19 @@ class TestGeneralCommissioning : public TestCommandBridge { params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:10U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:5000ULL]; [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Try to arm fail-safe from wrong fabric Error: %@", err); + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Try to arm fail-safe from wrong fabric Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); - } + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94219,7 +94256,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check Breadcrumb was not touched by ArmFailSafe with existing fail-safe armed Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94243,7 +94280,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster commissioningCompleteWithCompletionHandler:^( + [cluster commissioningCompleteWithCompletion:^( MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Send CommissioningComplete from wrong fabric Error: %@", err); @@ -94268,7 +94305,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check Breadcrumb was not touched by CommissioningComplete from wrong fabric Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94292,7 +94329,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster commissioningCompleteWithCompletionHandler:^( + [cluster commissioningCompleteWithCompletion:^( MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Close out the fail-safe gracefully Error: %@", err); @@ -94317,7 +94354,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check Breadcrumb was reset to 0 by CommissioningComplete Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94345,19 +94382,19 @@ class TestGeneralCommissioning : public TestCommandBridge { params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:500U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:3ULL]; [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Arm fail-safe again Error: %@", err); + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Arm fail-safe again Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); - } + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94370,7 +94407,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check Breadcrumb was set by arming fail-safe again Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94398,19 +94435,19 @@ class TestGeneralCommissioning : public TestCommandBridge { params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:0U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:4ULL]; [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Force-expire the fail-safe Error: %@", err); + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Force-expire the fail-safe Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); - } + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94423,7 +94460,7 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check Breadcrumb was reset by expiring the fail-safe Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94447,15 +94484,14 @@ class TestGeneralCommissioning : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeSupportsConcurrentConnectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Validate presence of SupportsConcurrentConnection Error: %@", err); + [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Validate presence of SupportsConcurrentConnection Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "boolean", "boolean")); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "boolean", "boolean")); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94562,13 +94598,13 @@ class TestIdentifyCluster : public TestCommandBridge { __auto_type * params = [[MTRIdentifyClusterIdentifyParams alloc] init]; params.identifyTime = [NSNumber numberWithUnsignedShort:0U]; [cluster identifyWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Identify command and expect success response Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Send Identify command and expect success response Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94713,7 +94749,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSupportedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read number of supported fabrics Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94734,7 +94770,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCommissionedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read number of commissioned fabrics Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94756,7 +94792,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read current fabric index Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -94783,19 +94819,19 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; params.fabricIndex = [NSNumber numberWithUnsignedChar:243U]; [cluster removeFabricWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove nonexistent fabric Error: %@", err); + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Remove nonexistent fabric Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.statusCode; - VerifyOrReturn(CheckValue("StatusCode", actualValue, 11U)); - } + { + id actualValue = values.statusCode; + VerifyOrReturn(CheckValue("StatusCode", actualValue, 11U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94810,23 +94846,23 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read fabric list before setting label Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read fabric list before setting label Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).fabricIndex, - ourFabricIndex)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", + ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).fabricIndex, + ourFabricIndex)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94841,24 +94877,24 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; params.label = @"Batcave"; [cluster updateFabricLabelWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Set the fabric label Error: %@", err); + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Set the fabric label Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.statusCode; - VerifyOrReturn(CheckValue("StatusCode", actualValue, 0U)); - } + { + id actualValue = values.statusCode; + VerifyOrReturn(CheckValue("StatusCode", actualValue, 0U)); + } - { - id actualValue = values.fabricIndex; - VerifyOrReturn(CheckValue("FabricIndex", actualValue, ourFabricIndex)); - } + { + id actualValue = values.fabricIndex; + VerifyOrReturn(CheckValue("FabricIndex", actualValue, ourFabricIndex)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -94873,23 +94909,24 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read fabric list after setting label Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read fabric list after setting label Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"Batcave")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).fabricIndex, - ourFabricIndex)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", + ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, + @"Batcave")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).fabricIndex, + ourFabricIndex)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -95204,7 +95241,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Read Description Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95228,7 +95265,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStandardNamespaceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read StandardNamespace Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95253,7 +95290,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSupportedModesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read SupportedModes Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95295,7 +95332,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read CurrentMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95319,7 +95356,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read StartUpMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95344,7 +95381,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read OnMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95371,13 +95408,13 @@ class TestModeSelectCluster : public TestCommandBridge { __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; params.newMode = [NSNumber numberWithUnsignedChar:4U]; [cluster changeToModeWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change to Supported Mode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Change to Supported Mode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -95391,7 +95428,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Current Mode Change Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95422,14 +95459,15 @@ class TestModeSelectCluster : public TestCommandBridge { params.newMode = [NSNumber numberWithUnsignedChar:2U]; [cluster changeToModeWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change to Unsupported Mode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Change to Unsupported Mode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -95440,7 +95478,7 @@ class TestModeSelectCluster : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Toggle OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95457,7 +95495,7 @@ class TestModeSelectCluster : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"Toggle OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95476,7 +95514,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Current Mode does not change when OnMode is null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95504,15 +95542,16 @@ class TestModeSelectCluster : public TestCommandBridge { onModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeOnModeWithValue:onModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change to Unsupported OnMode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Change to Unsupported OnMode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -95528,13 +95567,13 @@ class TestModeSelectCluster : public TestCommandBridge { id onModeArgument; onModeArgument = [NSNumber numberWithUnsignedChar:7U]; [cluster writeAttributeOnModeWithValue:onModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change OnMode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Change OnMode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -95548,7 +95587,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify OnMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95574,7 +95613,7 @@ class TestModeSelectCluster : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Toggle OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95591,7 +95630,7 @@ class TestModeSelectCluster : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"Toggle OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95610,7 +95649,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Current Mode Changes if OnMode is not null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95637,16 +95676,17 @@ class TestModeSelectCluster : public TestCommandBridge { id startUpModeArgument; startUpModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeStartUpModeWithValue:startUpModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change to Unsupported StartUp Mode Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + completion:^(NSError * _Nullable err) { + NSLog(@"Change to Unsupported StartUp Mode Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -95662,13 +95702,13 @@ class TestModeSelectCluster : public TestCommandBridge { id startUpModeArgument; startUpModeArgument = [NSNumber numberWithUnsignedChar:7U]; [cluster writeAttributeStartUpModeWithValue:startUpModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change to Supported StartUp Mode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Change to Supported StartUp Mode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -95681,7 +95721,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify StartUp Mode Change Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95709,13 +95749,13 @@ class TestModeSelectCluster : public TestCommandBridge { __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; params.newMode = [NSNumber numberWithUnsignedChar:0U]; [cluster changeToModeWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change CurrentMode to another value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Change CurrentMode to another value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -95731,13 +95771,13 @@ class TestModeSelectCluster : public TestCommandBridge { id onModeArgument; onModeArgument = [NSNumber numberWithUnsignedChar:4U]; [cluster writeAttributeOnModeWithValue:onModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change On Mode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Change On Mode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -95751,13 +95791,13 @@ class TestModeSelectCluster : public TestCommandBridge { id startUpOnOffArgument; startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Set StartUpOnOff Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Set StartUpOnOff Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -95783,7 +95823,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Current Mode Change based on OnMode, as it overwrites StartUpMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95810,13 +95850,13 @@ class TestModeSelectCluster : public TestCommandBridge { id onModeArgument; onModeArgument = nil; [cluster writeAttributeOnModeWithValue:onModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Change On Mode to Null Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Change On Mode to Null Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -95842,7 +95882,7 @@ class TestModeSelectCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify Current Mode Change based on new StartUp Mode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95970,7 +96010,7 @@ class TestSelfFabricRemoval : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCommissionedFabricsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read number of commissioned fabrics Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -95995,7 +96035,7 @@ class TestSelfFabricRemoval : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read current fabric index Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -96022,14 +96062,14 @@ class TestSelfFabricRemoval : public TestCommandBridge { __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; params.fabricIndex = [ourFabricIndex copy]; [cluster removeFabricWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove single own fabric Error: %@", err); + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Remove single own fabric Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -96597,13 +96637,13 @@ class TestBinding : public TestCommandBridge { bindingArgument = temp_0; } [cluster writeAttributeBindingWithValue:bindingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write empty binding table Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write empty binding table Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -96619,18 +96659,18 @@ class TestBinding : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeBindingWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read empty binding table Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read empty binding table Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(0))); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(0))); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -96658,17 +96698,18 @@ class TestBinding : public TestCommandBridge { bindingArgument = temp_0; } - [cluster writeAttributeBindingWithValue:bindingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write invalid binding table Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + [cluster + writeAttributeBindingWithValue:bindingArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Write invalid binding table Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -96702,13 +96743,13 @@ class TestBinding : public TestCommandBridge { bindingArgument = temp_0; } [cluster writeAttributeBindingWithValue:bindingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write binding table (endpoint 1) Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write binding table (endpoint 1) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -96723,35 +96764,37 @@ class TestBinding : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster - readAttributeBindingWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read binding table (endpoint 1) Error: %@", err); + [cluster readAttributeBindingWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read binding table (endpoint 1) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("Group", ((MTRBindingClusterTargetStruct *) actualValue[0]).group, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[1]).node, 1ULL)); - VerifyOrReturn( - CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[1]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("Cluster", ((MTRBindingClusterTargetStruct *) actualValue[1]).cluster, 6UL)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[2]).node, 2ULL)); - VerifyOrReturn( - CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[2]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(3))); + VerifyOrReturn( + CheckValue("Group", ((MTRBindingClusterTargetStruct *) actualValue[0]).group, 1U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); + VerifyOrReturn( + CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[1]).node, 1ULL)); + VerifyOrReturn(CheckValue( + "Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[1]).endpoint, 1U)); + VerifyOrReturn(CheckValue( + "Cluster", ((MTRBindingClusterTargetStruct *) actualValue[1]).cluster, 6UL)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1U)); + VerifyOrReturn( + CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[2]).node, 2ULL)); + VerifyOrReturn(CheckValue( + "Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[2]).endpoint, 1U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -96775,13 +96818,13 @@ class TestBinding : public TestCommandBridge { bindingArgument = temp_0; } [cluster writeAttributeBindingWithValue:bindingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write binding table (endpoint 0) Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write binding table (endpoint 0) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -96796,25 +96839,25 @@ class TestBinding : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster - readAttributeBindingWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read binding table (endpoint 0) Error: %@", err); + [cluster readAttributeBindingWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read binding table (endpoint 0) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[0]).node, 3ULL)); - VerifyOrReturn( - CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[0]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(1))); + VerifyOrReturn( + CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[0]).node, 3ULL)); + VerifyOrReturn(CheckValue( + "Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[0]).endpoint, 1U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -96829,35 +96872,37 @@ class TestBinding : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster - readAttributeBindingWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Verify endpoint 1 not changed Error: %@", err); + [cluster readAttributeBindingWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify endpoint 1 not changed Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("Group", ((MTRBindingClusterTargetStruct *) actualValue[0]).group, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[1]).node, 1ULL)); - VerifyOrReturn( - CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[1]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("Cluster", ((MTRBindingClusterTargetStruct *) actualValue[1]).cluster, 6UL)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[2]).node, 2ULL)); - VerifyOrReturn( - CheckValue("Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[2]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((MTRBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(3))); + VerifyOrReturn( + CheckValue("Group", ((MTRBindingClusterTargetStruct *) actualValue[0]).group, 1U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); + VerifyOrReturn( + CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[1]).node, 1ULL)); + VerifyOrReturn(CheckValue( + "Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[1]).endpoint, 1U)); + VerifyOrReturn(CheckValue( + "Cluster", ((MTRBindingClusterTargetStruct *) actualValue[1]).cluster, 6UL)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1U)); + VerifyOrReturn( + CheckValue("Node", ((MTRBindingClusterTargetStruct *) actualValue[2]).node, 2ULL)); + VerifyOrReturn(CheckValue( + "Endpoint", ((MTRBindingClusterTargetStruct *) actualValue[2]).endpoint, 1U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97032,13 +97077,13 @@ class TestUserLabelCluster : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Commit User Label List Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Commit User Label List Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97051,7 +97096,7 @@ class TestUserLabelCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify committed User Label List Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97092,13 +97137,13 @@ class TestUserLabelCluster : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear User Label List Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear User Label List Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97111,7 +97156,7 @@ class TestUserLabelCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Read User Label List Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97157,13 +97202,13 @@ class TestUserLabelCluster : public TestCommandBridge { labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write User Label List Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write User Label List Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97189,7 +97234,7 @@ class TestUserLabelCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify User Label List after reboot Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97331,17 +97376,18 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { labelListArgument = temp_0; } - [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Attempt to write overly long item for label Error: %@", err); + [cluster + writeAttributeLabelListWithValue:labelListArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Attempt to write overly long item for label Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97363,17 +97409,18 @@ class TestUserLabelClusterConstraints : public TestCommandBridge { labelListArgument = temp_0; } - [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Attempt to write overly long item for value Error: %@", err); + [cluster + writeAttributeLabelListWithValue:labelListArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Attempt to write overly long item for value Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97532,21 +97579,21 @@ class TestArmFailSafe : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query fabrics list Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query fabrics list Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", + ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + } - VerifyOrReturn(CheckConstraintType("fabrics", "list", "list")); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("fabrics", "list", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97563,19 +97610,19 @@ class TestArmFailSafe : public TestCommandBridge { params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:0U]; params.breadcrumb = [NSNumber numberWithUnsignedLongLong:0ULL]; [cluster armFailSafeWithParams:params - completionHandler:^( - MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"ArmFailSafe on target device with timeout 0 Error: %@", err); + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"ArmFailSafe on target device with timeout 0 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); - } + { + id actualValue = values.errorCode; + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97586,7 +97633,7 @@ class TestArmFailSafe : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads NodeLabel mandatory attribute of target device Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -97612,16 +97659,17 @@ class TestArmFailSafe : public TestCommandBridge { __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; params.rootCertificate = [[NSData alloc] initWithBytes:"00000000" length:8]; [cluster addTrustedRootCertificateWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Invoke AddTrustedRootCertificate without fail-safe Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Invoke AddTrustedRootCertificate without fail-safe Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97639,15 +97687,16 @@ class TestArmFailSafe : public TestCommandBridge { length:16]; params.caseAdminSubject = [NSNumber numberWithUnsignedLongLong:1234ULL]; params.adminVendorId = [NSNumber numberWithUnsignedShort:65521U]; - [cluster addNOCWithParams:params - completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Invoke AddNOC without fail-safe Error: %@", err); + [cluster + addNOCWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Invoke AddNOC without fail-safe Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97663,14 +97712,15 @@ class TestArmFailSafe : public TestCommandBridge { params.nocValue = [[NSData alloc] initWithBytes:"00112233" length:8]; [cluster updateNOCWithParams:params - completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Invoke UpdateNOC without fail-safe Error: %@", err); + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Invoke UpdateNOC without fail-safe Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97688,14 +97738,15 @@ class TestArmFailSafe : public TestCommandBridge { length:32]; [cluster CSRRequestWithParams:params - completionHandler:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Invoke CSRRequest without fail-safe Error: %@", err); + completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Invoke CSRRequest without fail-safe Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILSAFE_REQUIRED)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97963,13 +98014,13 @@ class TestFanControl : public TestCommandBridge { id fanModeArgument; fanModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeFanModeWithValue:fanModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write fan mode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write fan mode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -97982,7 +98033,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFanModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back fan mode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98009,13 +98060,13 @@ class TestFanControl : public TestCommandBridge { id fanModeSequenceArgument; fanModeSequenceArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeFanModeSequenceWithValue:fanModeSequenceArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write fan mode sequence Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write fan mode sequence Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98028,7 +98079,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFanModeSequenceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back fan mode sequence Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98055,13 +98106,13 @@ class TestFanControl : public TestCommandBridge { id percentSettingArgument; percentSettingArgument = [NSNumber numberWithUnsignedChar:84U]; [cluster writeAttributePercentSettingWithValue:percentSettingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write percent setting Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write percent setting Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98074,7 +98125,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98099,7 +98150,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98124,7 +98175,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed current Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98151,13 +98202,13 @@ class TestFanControl : public TestCommandBridge { id percentSettingArgument; percentSettingArgument = nil; [cluster writeAttributePercentSettingWithValue:percentSettingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write percent setting Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write percent setting Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98170,7 +98221,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98198,13 +98249,13 @@ class TestFanControl : public TestCommandBridge { id speedSettingArgument; speedSettingArgument = [NSNumber numberWithUnsignedChar:73U]; [cluster writeAttributeSpeedSettingWithValue:speedSettingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write speed setting Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write speed setting Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98217,7 +98268,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98242,7 +98293,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98267,7 +98318,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent current Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98294,13 +98345,13 @@ class TestFanControl : public TestCommandBridge { id speedSettingArgument; speedSettingArgument = nil; [cluster writeAttributeSpeedSettingWithValue:speedSettingArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write speed setting Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write speed setting Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98313,7 +98364,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98341,13 +98392,13 @@ class TestFanControl : public TestCommandBridge { id fanModeArgument; fanModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeFanModeWithValue:fanModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write fan mode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write fan mode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98360,7 +98411,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98385,7 +98436,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent current Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98409,7 +98460,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98434,7 +98485,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedCurrentWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed current Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98461,13 +98512,13 @@ class TestFanControl : public TestCommandBridge { id fanModeArgument; fanModeArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeFanModeWithValue:fanModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write fan mode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write fan mode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98480,7 +98531,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePercentSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back percent setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98504,7 +98555,7 @@ class TestFanControl : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSpeedSettingWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read back speed setting Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -98713,17 +98764,17 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: PASE reserved for future (TC-ACL-2.4 step 29) Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Constraint error: PASE reserved for future (TC-ACL-2.4 step 29) Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98764,15 +98815,17 @@ class TestAccessControlConstraints : public TestCommandBridge { } [cluster writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid combination administer + group (TC-ACL-2.4 step 31) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + completion:^(NSError * _Nullable err) { + NSLog(@"Constraint error: Invalid combination administer + group (TC-ACL-2.4 step 31) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98811,17 +98864,17 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid auth mode (TC-ACL-2.4 step 33) Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Constraint error: Invalid auth mode (TC-ACL-2.4 step 33) Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98861,17 +98914,17 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid subject (TC-ACL-2.4 step 34) Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Constraint error: Invalid subject (TC-ACL-2.4 step 34) Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98915,17 +98968,17 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid target (TC-ACL-2.4 step 38) Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Constraint error: Invalid target (TC-ACL-2.4 step 38) Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -98971,15 +99024,17 @@ class TestAccessControlConstraints : public TestCommandBridge { } [cluster writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: target has both endpoint and device type (TC-ACL-2.4 step 42) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + completion:^(NSError * _Nullable err) { + NSLog(@"Constraint error: target has both endpoint and device type (TC-ACL-2.4 step 42) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -99015,17 +99070,17 @@ class TestAccessControlConstraints : public TestCommandBridge { aclArgument = temp_0; } - [cluster - writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: Invalid privilege value step 32) Error: %@", err); + [cluster writeAttributeAclWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Constraint error: Invalid privilege value step 32) Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -99067,15 +99122,17 @@ class TestAccessControlConstraints : public TestCommandBridge { } [cluster writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: invalid subject 0xFFFF_FFFF_FFFF_FFFF (TC-ACL-2.4 step 35) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + completion:^(NSError * _Nullable err) { + NSLog( + @"Constraint error: invalid subject 0xFFFF_FFFF_FFFF_FFFF (TC-ACL-2.4 step 35) Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -99117,15 +99174,17 @@ class TestAccessControlConstraints : public TestCommandBridge { } [cluster writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: invalid subject 0xFFFF_FFFD_0000_0000 (TC-ACL-2.4 step 36) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + completion:^(NSError * _Nullable err) { + NSLog( + @"Constraint error: invalid subject 0xFFFF_FFFD_0000_0000 (TC-ACL-2.4 step 36) Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -99167,15 +99226,17 @@ class TestAccessControlConstraints : public TestCommandBridge { } [cluster writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Constraint error: invalid subject 0xFFFF_FFFF_FFFF_0000 (TC-ACL-2.4 step 37) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + completion:^(NSError * _Nullable err) { + NSLog( + @"Constraint error: invalid subject 0xFFFF_FFFF_FFFF_0000 (TC-ACL-2.4 step 37) Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -99502,13 +99563,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a MoveToLevel command to set CurrentLevel to min value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Sends a MoveToLevel command to set CurrentLevel to min value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -99528,7 +99589,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99556,13 +99617,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { id onOffTransitionTimeArgument; onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write OnOffTransitionTime attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write OnOffTransitionTime attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -99582,7 +99643,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read OnOffTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99609,13 +99670,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { id onLevelArgument; onLevelArgument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeOnLevelWithValue:onLevelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write OnLevel attribute Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write OnLevel attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -99635,7 +99696,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read OnLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99660,7 +99721,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read MinValue attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99682,7 +99743,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99699,7 +99760,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99730,7 +99791,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"If OnLevel is defined, check CurrentLevel is OnLevel value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99753,7 +99814,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99770,7 +99831,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99801,7 +99862,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"If OnLevel is defined, check CurrentLevel is min value Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99832,13 +99893,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { params.optionsMask = [NSNumber numberWithUnsignedChar:1U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a MoveToLevel command to set CurrentLevel to a mid value Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Sends a MoveToLevel command to set CurrentLevel to a mid value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -99858,7 +99919,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentLevel attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99886,13 +99947,13 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { id onLevelArgument; onLevelArgument = nil; [cluster writeAttributeOnLevelWithValue:onLevelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Set OnLevel attribute to null Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Set OnLevel attribute to null Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -99912,7 +99973,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read OnLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99934,7 +99995,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send On Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99951,7 +100012,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99982,7 +100043,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"If OnLevel is not defined, check CurrentLevel is restored Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100005,7 +100066,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Send Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100022,7 +100083,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100053,7 +100114,7 @@ class TestLevelControlWithOnOffDependency : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"If OnLevel is not defined, check CurrentLevel is restored Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100360,7 +100421,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Get alpha's fabric index Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100383,7 +100444,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that commissioning window is not open Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100406,7 +100467,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that there is no AdminFabricIndex Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100429,7 +100490,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that there is no AdminVendorId Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100455,13 +100516,13 @@ class TestCommissioningWindow : public TestCommandBridge { __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Open Commissioning Window from alpha Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -100473,7 +100534,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that commissioning window is open Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100496,7 +100557,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminFabricIndex Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100520,7 +100581,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminVendorId is not null Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100542,7 +100603,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { + [cluster revokeCommissioningWithCompletion:^(NSError * _Nullable err) { NSLog(@"Close Commissioning Window Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100560,7 +100621,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that commissioning window is again not open Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100583,7 +100644,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that again there is no AdminFabricIndex Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100606,7 +100667,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that again there is no AdminVendorId Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100632,13 +100693,13 @@ class TestCommissioningWindow : public TestCommandBridge { __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha again Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Open Commissioning Window from alpha again Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -100665,7 +100726,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that commissioning window is not open for the third time Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100688,7 +100749,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that there is no AdminFabricIndex for the third time Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100711,7 +100772,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that there is no AdminVendorId for the third time Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100734,7 +100795,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Get beta's fabric index Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100760,13 +100821,13 @@ class TestCommissioningWindow : public TestCommandBridge { __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from beta Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Open Commissioning Window from beta Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -100778,7 +100839,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that commissioning window is open again Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100801,7 +100862,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminFabricIndex again Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100826,7 +100887,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminVendorId is not null again Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100855,14 +100916,14 @@ class TestCommissioningWindow : public TestCommandBridge { params.fabricIndex = mBetaIndex.HasValue() ? [NSNumber numberWithUnsignedChar:mBetaIndex.Value()] : [NSNumber numberWithUnsignedChar:2U]; [cluster removeFabricWithParams:params - completionHandler:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove beta fabric Error: %@", err); + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Remove beta fabric Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -100874,7 +100935,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWindowStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check that commissioning window is still open Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100897,7 +100958,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminFabricIndexWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminFabricIndex got reset Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -100920,7 +100981,7 @@ class TestCommissioningWindow : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAdminVendorIdWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Check the AdminVendorId did not get reset Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101185,13 +101246,13 @@ class TestMultiAdmin : public TestCommandBridge { __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Open Commissioning Window from alpha Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -101214,18 +101275,18 @@ class TestMultiAdmin : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:false]; [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check that we just have the one fabric and did not add a new one Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check that we just have the one fabric and did not add a new one Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -101237,7 +101298,7 @@ class TestMultiAdmin : public TestCommandBridge { [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { + [cluster revokeCommissioningWithCompletion:^(NSError * _Nullable err) { NSLog(@"Close Commissioning Window after failed commissioning Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101258,13 +101319,13 @@ class TestMultiAdmin : public TestCommandBridge { __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from alpha again Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Open Commissioning Window from alpha again Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -101294,13 +101355,13 @@ class TestMultiAdmin : public TestCommandBridge { __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Open Commissioning Window from beta Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Open Commissioning Window from beta Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -101327,7 +101388,7 @@ class TestMultiAdmin : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"read the mandatory attribute: NodeLabel from alpha Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101355,13 +101416,13 @@ class TestMultiAdmin : public TestCommandBridge { id nodeLabelArgument; nodeLabelArgument = @"written from beta"; [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the mandatory attribute NodeLabel from beta Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"write the mandatory attribute NodeLabel from beta Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -101372,7 +101433,7 @@ class TestMultiAdmin : public TestCommandBridge { MTRBaseClusterBasic * cluster = [[MTRBaseClusterBasic alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { NSLog(@"read the mandatory attribute: NodeLabel from gamma Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101394,13 +101455,13 @@ class TestMultiAdmin : public TestCommandBridge { id nodeLabelArgument; nodeLabelArgument = [readFromAlpha copy]; [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the mandatory attribute NodeLabel back to default Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"write the mandatory attribute NodeLabel back to default Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -101608,7 +101669,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101633,7 +101694,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101658,7 +101719,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DGSW.S.F00(Watermarks) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101678,7 +101739,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101704,7 +101765,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(ThreadMetrics) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101726,7 +101787,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(CurrentHeapFree) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101748,7 +101809,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(CurrentHeapUsed) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101770,7 +101831,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent attribute(CurrentHeapHighWatermark) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101792,7 +101853,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101814,7 +101875,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101839,7 +101900,7 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -101995,7 +102056,7 @@ class TestSubscribe_OnOff : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Set OnOff Attribute to false Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -102068,7 +102129,7 @@ class TestSubscribe_OnOff : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + [cluster onWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn On the light to see attribute change Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -102107,7 +102168,7 @@ class TestSubscribe_OnOff : public TestCommandBridge { MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + [cluster offWithCompletion:^(NSError * _Nullable err) { NSLog(@"Turn Off the light to see attribute change Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -103096,63 +103157,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read available user slot and verify response fields Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read available user slot and verify response fields Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103166,22 +103227,21 @@ class DL_UsersAndCredentials : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported users and verify default value Error: %@", err); + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Get number of supported users and verify default value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("NumberOfTotalUsersSupported", actualValue, 10U)); - } - { - NumberOfTotalUsersSupported = value; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("NumberOfTotalUsersSupported", actualValue, 10U)); + } + { + NumberOfTotalUsersSupported = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103196,15 +103256,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read fails for user with index 0 Error: %@", err); + [cluster + getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read fails for user with index 0 Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103219,15 +103280,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; - [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read fails for user with index greater than Number Of Users Supported Error: %@", err); + [cluster + getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read fails for user with index greater than Number Of Users Supported Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103249,13 +103311,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create new user with default parameters Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create new user with default parameters Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103271,69 +103333,69 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and verify its fields Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user back and verify its fields Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103354,15 +103416,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userStatus = nil; params.userType = nil; params.credentialRule = nil; - [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Set user at the occupied index fails with appropriate response Error: %@", err); + [cluster + setUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Set user at the occupied index fails with appropriate response Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103384,13 +103447,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Modify userName for existing user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Modify userName for existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103406,69 +103469,69 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the modified user back and verify its fields Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the modified user back and verify its fields Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"new_user")); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"new_user")); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103490,13 +103553,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Modify userUniqueId for existing user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Modify userUniqueId for existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103512,70 +103575,70 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the modified user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"new_user")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 305441741UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the modified user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"new_user")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 305441741UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103597,13 +103660,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Modify userStatus for existing user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Modify userStatus for existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103619,70 +103682,70 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the modified user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"new_user")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 305441741UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 3U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the modified user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"new_user")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 305441741UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 3U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103704,13 +103767,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:6U]; params.credentialRule = nil; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Modify userType for existing user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Modify userType for existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103726,70 +103789,70 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the modified user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"new_user")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 305441741UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 3U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 6U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the modified user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"new_user")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 305441741UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 3U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 6U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103811,13 +103874,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = [NSNumber numberWithUnsignedChar:2U]; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Modify credentialRule for existing user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Modify credentialRule for existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103833,70 +103896,70 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the modified user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"new_user")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 305441741UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 3U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 6U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 2U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the modified user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"new_user")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 305441741UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 3U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 6U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 2U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103918,13 +103981,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:1U]; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Modify all fields for existing user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Modify all fields for existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -103940,70 +104003,70 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the modified user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"test_user")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 466460832UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 1U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the modified user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"test_user")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 466460832UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 1U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104025,13 +104088,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:1U]; params.credentialRule = [NSNumber numberWithUnsignedChar:2U]; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Add another user with non-default fields Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Add another user with non-default fields Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104047,70 +104110,70 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the new user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"test_user2")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 12648430UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 1U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 2U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the new user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"test_user2")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 12648430UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 1U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 2U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104131,15 +104194,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userStatus = [NSNumber numberWithUnsignedChar:0U]; params.userType = nil; params.credentialRule = nil; - [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to add a user with userStatus 0 Error: %@", err); + [cluster + setUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Try to add a user with userStatus 0 Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104155,63 +104219,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure the user did not get created Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure the user did not get created Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104232,15 +104296,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userStatus = [NSNumber numberWithUnsignedChar:2U]; params.userType = nil; params.credentialRule = nil; - [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to add a user with userStatus 2 Error: %@", err); + [cluster + setUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Try to add a user with userStatus 2 Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104256,63 +104321,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure the user did not get created Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure the user did not get created Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104334,13 +104399,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to add a user with userStatus 3 Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to add a user with userStatus 3 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104356,70 +104421,70 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the new third user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"test_user3")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 47802UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 3U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the new third user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"test_user3")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 47802UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 3U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104441,13 +104506,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create user in the last slot Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create user in the last slot Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104463,69 +104528,69 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NumberOfTotalUsersSupported copy]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the last user back and verify its fields Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the last user back and verify its fields Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, NumberOfTotalUsersSupported)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, NumberOfTotalUsersSupported)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"last_user")); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"last_user")); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104546,15 +104611,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userStatus = nil; params.userType = nil; params.credentialRule = nil; - [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"User creation in the 0 slot fails Error: %@", err); + [cluster + setUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"User creation in the 0 slot fails Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104575,15 +104641,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userStatus = nil; params.userType = nil; params.credentialRule = nil; - [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"User creation in the out-of-bounds slot fails Error: %@", err); + [cluster + setUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"User creation in the out-of-bounds slot fails Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104599,13 +104666,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear first user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104621,64 +104688,64 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read cleared user and verify it is available Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read cleared user and verify it is available Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104700,13 +104767,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create new user in the cleared slot Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create new user in the cleared slot Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104722,70 +104789,70 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user in the previously cleared slot and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user in the previously cleared slot and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104800,15 +104867,17 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear user with index 0 fails Error: %@", err); + [cluster + clearUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear user with index 0 fails Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104823,15 +104892,17 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; - [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear user with out-of-bounds index fails Error: %@", err); + [cluster + clearUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear user with out-of-bounds index fails Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104847,13 +104918,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all users Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear all users Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104869,63 +104940,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read first cleared user and verify it is available Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read first cleared user and verify it is available Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104941,63 +105012,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NumberOfTotalUsersSupported copy]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read last cleared user and verify it is available Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read last cleared user and verify it is available Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, NumberOfTotalUsersSupported)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, NumberOfTotalUsersSupported)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105011,22 +105082,21 @@ class DL_UsersAndCredentials : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNumberOfPINUsersSupportedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported PIN credentials and verify default value Error: %@", err); + [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Get number of supported PIN credentials and verify default value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("NumberOfPINUsersSupported", actualValue, 10U)); - } - { - NumberOfPINUsersSupported = value; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("NumberOfPINUsersSupported", actualValue, 10U)); + } + { + NumberOfPINUsersSupported = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105045,39 +105115,39 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Check that PIN credential does not exist Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Check that PIN credential does not exist Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105096,39 +105166,39 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Reading PIN credential with index 0 returns no credential Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Reading PIN credential with index 0 returns no credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105147,40 +105217,41 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfPINUsersSupported unsignedShortValue] + 1U]; - [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Reading PIN credential with out-of-bounds index returns no credential Error: %@", err); + [cluster + getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Reading PIN credential with out-of-bounds index returns no credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105205,29 +105276,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify that a user with UserStatus = 0 cannot be added via SetCredential Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify that a user with UserStatus = 0 cannot be added via SetCredential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105252,29 +105323,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify that a user with UserStatus = 2 cannot be added via SetCredential Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify that a user with UserStatus = 2 cannot be added via SetCredential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105299,30 +105370,30 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105338,74 +105409,74 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); - VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(1))); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); - VerifyOrReturn(CheckValue( - "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify created user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); + VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105424,42 +105495,42 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created PIN credential Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created PIN credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105484,29 +105555,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and user with index 0 fails Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and user with index 0 fails Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105532,28 +105603,28 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and user with out-of-bounds index fails Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and user with out-of-bounds index fails Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105567,22 +105638,21 @@ class DL_UsersAndCredentials : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported RFID credentials and verify default value Error: %@", err); + [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Get number of supported RFID credentials and verify default value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("NumberOfRFIDUsersSupported", actualValue, 10U)); - } - { - NumberOfRFIDUsersSupported = value; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("NumberOfRFIDUsersSupported", actualValue, 10U)); + } + { + NumberOfRFIDUsersSupported = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105601,36 +105671,36 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Reading RFID credential with index 0 returns no credential duplicate with bug workaround " - @"Error: %@", - err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Reading RFID credential with index 0 returns no credential duplicate with bug " + @"workaround Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105649,40 +105719,41 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfRFIDUsersSupported unsignedShortValue] + 1U]; - [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Reading RFID credential with out-of-bounds index returns no credential Error: %@", err); + [cluster + getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Reading RFID credential with out-of-bounds index returns no credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105701,39 +105772,39 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Check that RFID credential does not exist Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Check that RFID credential does not exist Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105758,29 +105829,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential and add it to existing user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID credential and add it to existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105796,78 +105867,78 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify modified user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); - VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(2))); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); - VerifyOrReturn(CheckValue( - "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); - VerifyOrReturn(CheckValue( - "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 2U)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify modified user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); + VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 2U)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105886,42 +105957,42 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created credential Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105946,29 +106017,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential and user with index 0 fails Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID credential and user with index 0 fails Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -105994,28 +106065,28 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential and user with out-of-bounds index fails Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID credential and user with out-of-bounds index fails Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106040,29 +106111,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new credential and try to add it to 0 user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new credential and try to add it to 0 user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106087,29 +106158,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new credential and try to add it to out-of-bounds user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new credential and try to add it to out-of-bounds user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106134,29 +106205,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN with too short data Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN with too short data Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106181,29 +106252,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN with too long data Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN with too long data Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106228,29 +106299,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID with too short data Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID with too short data Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106275,29 +106346,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:3U]; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN with Programming user type fails Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN with Programming user type fails Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106322,29 +106393,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID with too short data Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID with too short data Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106369,29 +106440,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential with data the would cause duplicate Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential with data the would cause duplicate Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 2U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106416,29 +106487,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential with data the would cause duplicate Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID credential with data the would cause duplicate Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 2U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106463,29 +106534,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Modify credentialData of existing PIN credential Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Modify credentialData of existing PIN credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106510,30 +106581,30 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify that credential was changed by creating new credential with old data Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify that credential was changed by creating new credential with old data Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106558,29 +106629,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify that credential was changed by creating new credential with new data Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify that credential was changed by creating new credential with new data Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 2U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106605,29 +106676,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential and add it to existing user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID credential and add it to existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106642,85 +106713,84 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster - getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify modified user Error: %@", err); + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify modified user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); - VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(3))); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); - VerifyOrReturn( - CheckValue("CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); - VerifyOrReturn( - CheckValue("CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 2U)); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialType, 2U)); - VerifyOrReturn( - CheckValue("CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 4U)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); + VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 2U)); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialType, 2U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 4U)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106745,29 +106815,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential and add it to existing user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID credential and add it to existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106782,89 +106852,88 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster - getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify modified user Error: %@", err); + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify modified user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); - VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(4))); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); - VerifyOrReturn( - CheckValue("CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); - VerifyOrReturn( - CheckValue("CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 2U)); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialType, 2U)); - VerifyOrReturn( - CheckValue("CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 4U)); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[3]).credentialType, 1U)); - VerifyOrReturn( - CheckValue("CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[3]).credentialIndex, 5U)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); + VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 2U)); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialType, 2U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 4U)); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[3]).credentialType, 1U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[3]).credentialIndex, 5U)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106883,13 +106952,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear first PIN credential Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear first PIN credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106908,40 +106977,40 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read back the credential and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Read back the credential and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -106956,85 +107025,84 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster - getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and make sure PIN credential is deleted Error: %@", err); + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user back and make sure PIN credential is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); - VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(3))); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 2U)); - VerifyOrReturn( - CheckValue("CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 2U)); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); - VerifyOrReturn( - CheckValue("CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 4U)); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialType, 1U)); - VerifyOrReturn( - CheckValue("CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 5U)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); + VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 2U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 2U)); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 4U)); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialType, 1U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 5U)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107053,13 +107121,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear the second PIN credential Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear the second PIN credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107078,40 +107146,40 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read back the credential and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Read back the credential and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107127,63 +107195,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and make sure related user is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user back and make sure related user is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107208,30 +107276,30 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential with user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID credential with user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107250,13 +107318,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all the RFID credentials Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear all the RFID credentials Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107275,40 +107343,40 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read back the fist RFID credential and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Read back the fist RFID credential and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107327,40 +107395,40 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read back the second RFID credential and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Read back the second RFID credential and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107379,40 +107447,40 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:4U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read back the third RFID credential and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Read back the third RFID credential and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107427,75 +107495,76 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with first RFID back and make sure it has only PIN credential Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); - VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(1))); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); - VerifyOrReturn(CheckValue( - "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 5U)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + [cluster + getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user related with first RFID back and make sure it has only PIN credential Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); + VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 5U)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107511,63 +107580,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with second RFID back and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user related with second RFID back and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107592,30 +107661,30 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential with user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential with user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107640,30 +107709,30 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new RFID credential with user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID credential with user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107688,30 +107757,30 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create another RFID credential with user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create another RFID credential with user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 4U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 4U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 7U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 7U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107727,13 +107796,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; params.credential = nil; [cluster clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all the credentials Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear all the credentials Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107752,39 +107821,39 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read back the first PIN credential and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Read back the first PIN credential and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107803,39 +107872,39 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read back the first RFID credential and make sure it is deleted Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Read back the first RFID credential and make sure it is deleted Error: %@", err); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - NextTest(); - }]; + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107854,39 +107923,39 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:6U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read back the second PIN credential and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Read back the second PIN credential and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107902,63 +107971,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with first PIN back and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user related with first PIN back and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -107974,63 +108043,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with first RFID back and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user related with first RFID back and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108046,63 +108115,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with second PIN back and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user related with second PIN back and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108118,63 +108187,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:4U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with last RFID back and make sure it is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user related with last RFID back and make sure it is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 4U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 4U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108199,28 +108268,28 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new Programming PIN credential with invalid index Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new Programming PIN credential with invalid index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108245,29 +108314,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new Programming PIN credential with valid index Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new Programming PIN credential with valid index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108283,74 +108352,74 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); - VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(1))); - VerifyOrReturn( - CheckValue("CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 0U)); - VerifyOrReturn(CheckValue( - "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 0U)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify created user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); + VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue( + "CredentialType", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialType, 0U)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((MTRDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 0U)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108369,42 +108438,42 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created programming PIN credential Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created programming PIN credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108429,28 +108498,28 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Modify the Programming PIN credential Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Modify the Programming PIN credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108468,17 +108537,17 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0U]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster - clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clearing Programming PIN fails Error: %@", err); + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clearing Programming PIN fails Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108496,17 +108565,17 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0U]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster - clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clearing Programming PIN with invalid index fails Error: %@", err); + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clearing Programming PIN with invalid index fails Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108524,17 +108593,17 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster - clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clearing PIN credential with zero index fails Error: %@", err); + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clearing PIN credential with zero index fails Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108553,17 +108622,17 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfPINUsersSupported unsignedShortValue] + 1U]; - [cluster - clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clearing PIN credential with out-of-bound index fails Error: %@", err); + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clearing PIN credential with out-of-bound index fails Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108581,17 +108650,17 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster - clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clearing RFID credential with zero index fails Error: %@", err); + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clearing RFID credential with zero index fails Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108610,17 +108679,17 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfRFIDUsersSupported unsignedShortValue] + 1U]; - [cluster - clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clearing RFID credential with out-of-bound index fails Error: %@", err); + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clearing RFID credential with out-of-bound index fails Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108636,13 +108705,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear the Programming PIN user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear the Programming PIN user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108658,63 +108727,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure Programming PIN user is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure Programming PIN user is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); - } + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); - } + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108733,39 +108802,39 @@ class DL_UsersAndCredentials : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure programming PIN credential is deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure programming PIN credential is deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108790,30 +108859,30 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108838,29 +108907,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create second PIN credential and add it to existing user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create second PIN credential and add it to existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108885,29 +108954,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create third PIN credential and add it to existing user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create third PIN credential and add it to existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108932,29 +109001,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create fourth PIN credential and add it to existing user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create fourth PIN credential and add it to existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -108979,29 +109048,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create fifth PIN credential and add it to existing user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create fifth PIN credential and add it to existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109026,29 +109095,29 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Try to create sixth PIN credential and make sure it fails Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Try to create sixth PIN credential and make sure it fails Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 137U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 137U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 7U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 7U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109064,13 +109133,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Final clean-up Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Final clean-up Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109430,13 +109499,13 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door without PIN Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to unlock the door without PIN Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109449,7 +109518,7 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify that lock state attribute value is set to Unlocked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109476,13 +109545,13 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to lock the door without a PIN Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to lock the door without a PIN Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109495,7 +109564,7 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify that lock state attribute value is set to Locked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109532,30 +109601,30 @@ class DL_LockUnlock : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109571,15 +109640,15 @@ class DL_LockUnlock : public TestCommandBridge { id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:20U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Set the WrongCodeEntryLimit to big value so that we can test incorrect PIN " - @"entry Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"Set the WrongCodeEntryLimit to big value so that we can test " + @"incorrect PIN entry Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109596,14 +109665,15 @@ class DL_LockUnlock : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"000000" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with invalid PIN Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to unlock the door with invalid PIN Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109616,7 +109686,7 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify that lock state attribute value is set to Locked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109644,13 +109714,13 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with valid PIN Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to unlock the door with valid PIN Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109663,7 +109733,7 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify that lock state attribute value is set to Unlocked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109690,15 +109760,17 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"000000" length:6]; - [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to lock the door with invalid PIN Error: %@", err); + [cluster + lockDoorWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Try to lock the door with invalid PIN Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109711,7 +109783,7 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify that lock state attribute value is set to Unlocked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109739,13 +109811,13 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to lock the door with valid PIN Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to lock the door with valid PIN Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109758,7 +109830,7 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify that lock state attribute value is set to Locked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -109786,13 +109858,13 @@ class DL_LockUnlock : public TestCommandBridge { id operatingModeArgument; operatingModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeOperatingModeWithValue:operatingModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Set OperatingMode to NoRemoteLockUnlock Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Set OperatingMode to NoRemoteLockUnlock Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109808,14 +109880,15 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door when OperatingMode is NoRemoteLockUnlock Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to unlock the door when OperatingMode is NoRemoteLockUnlock Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109831,13 +109904,13 @@ class DL_LockUnlock : public TestCommandBridge { id operatingModeArgument; operatingModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOperatingModeWithValue:operatingModeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Set OperatingMode to Normal Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Set OperatingMode to Normal Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109850,19 +109923,18 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the lockout timeout Error: %@", err); + [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the lockout timeout Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("UserCodeTemporaryDisableTime", actualValue, 10U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("UserCodeTemporaryDisableTime", actualValue, 10U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109879,13 +109951,15 @@ class DL_LockUnlock : public TestCommandBridge { wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Set the WrongCodeEntryLimit to small value so we can test lockout Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog( + @"Set the WrongCodeEntryLimit to small value so we can test lockout Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109902,14 +109976,15 @@ class DL_LockUnlock : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"000000" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with invalid PIN for the first time Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to unlock the door with invalid PIN for the first time Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109926,14 +110001,15 @@ class DL_LockUnlock : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"000000" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with invalid PIN for the second time Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to unlock the door with invalid PIN for the second time Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109950,14 +110026,15 @@ class DL_LockUnlock : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"000000" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with invalid PIN for the third time Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to unlock the door with invalid PIN for the third time Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -109974,14 +110051,15 @@ class DL_LockUnlock : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with valid PIN and make sure it fails due to lockout Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to unlock the door with valid PIN and make sure it fails due to lockout Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -110004,13 +110082,13 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with valid PIN and make sure it succeeds Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to unlock the door with valid PIN and make sure it succeeds Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -110023,7 +110101,7 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify that lock state attribute value is set to Unlocked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110051,13 +110129,13 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Lock the door back prior to next tests Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Lock the door back prior to next tests Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -110082,30 +110160,30 @@ class DL_LockUnlock : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create a disabled user and credential Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create a disabled user and credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -110122,14 +110200,15 @@ class DL_LockUnlock : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"654321" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to unlock the door with disabled user PIN Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Try to unlock the door with disabled user PIN Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -110142,7 +110221,7 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify that lock state attribute value is set to Locked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110170,13 +110249,13 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Unlock the door with enabled user PIN Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Unlock the door with enabled user PIN Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -110189,7 +110268,7 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify that lock state attribute value is set to Unlocked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110216,15 +110295,17 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"654321" length:6]; - [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Try to lock the door with disabled user PIN Error: %@", err); + [cluster + lockDoorWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Try to lock the door with disabled user PIN Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -110237,7 +110318,7 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify that lock state attribute value stays Unlocked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110265,13 +110346,13 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Lock the door with enabled user PIN Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Lock the door with enabled user PIN Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -110284,7 +110365,7 @@ class DL_LockUnlock : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Verify that lock state attribute value is set to Locked Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -110312,13 +110393,13 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clean all the users and credentials Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clean all the users and credentials Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111317,30 +111398,30 @@ class DL_Schedules : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and schedule user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and schedule user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111354,22 +111435,21 @@ class DL_Schedules : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get number of supported users Error: %@", err); + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Get number of supported users Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("NumberOfTotalUsersSupported", actualValue, 10U)); - } - { - NumberOfTotalUsersSupported = value; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("NumberOfTotalUsersSupported", actualValue, 10U)); + } + { + NumberOfTotalUsersSupported = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111383,7 +111463,7 @@ class DL_Schedules : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:^( + [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Get Max number of Week Day schedules for user and verify default value Error: %@", err); @@ -111412,7 +111492,7 @@ class DL_Schedules : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:^( + [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Get Max number of Year Day schedules for user and verify default value Error: %@", err); @@ -111441,22 +111521,22 @@ class DL_Schedules : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Get Max number of Holiday schedules and verify default value Error: %@", err); + [cluster + readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Get Max number of Holiday schedules and verify default value Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("NumberOfHolidaySchedulesSupported", actualValue, 10U)); - } - { - NumberOfHolidaySchedulesSupported = value; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("NumberOfHolidaySchedulesSupported", actualValue, 10U)); + } + { + NumberOfHolidaySchedulesSupported = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111477,17 +111557,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with 0 index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with 0 index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111508,17 +111588,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with out-of-bounds index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with out-of-bounds index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111539,17 +111619,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with 0 user index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with 0 user index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111570,17 +111650,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with out-of-bounds user index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with out-of-bounds user index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111601,17 +111681,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule for non-existing user Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule for non-existing user Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111632,17 +111712,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with 0 days mask Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with 0 days mask Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111663,17 +111743,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule for Sunday and Monday Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule for Sunday and Monday Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111694,17 +111774,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule for Sunday Wednesday and Saturday Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule for Sunday Wednesday and Saturday Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111725,17 +111805,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with invalid start hour Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with invalid start hour Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111756,17 +111836,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:60U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with invalid start minute Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with invalid start minute Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111787,17 +111867,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:24U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with invalid end hour Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with invalid end hour Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111818,17 +111898,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:60U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with invalid end minute Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with invalid end minute Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111849,17 +111929,17 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:16U]; params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with start hour later that end hour Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with start hour later that end hour Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111880,18 +111960,19 @@ class DL_Schedules : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:50U]; params.endHour = [NSNumber numberWithUnsignedChar:15U]; params.endMinute = [NSNumber numberWithUnsignedChar:49U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with start minute later that end minute when hours are equal Error: %@", - err); + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with start minute later that end minute when hours are " + @"equal Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111908,29 +111989,29 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that previous operations did not create a schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that previous operations did not create a schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111947,29 +112028,29 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Week Day schedule with 0 index Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Week Day schedule with 0 index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -111986,30 +112067,30 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Week Day schedule with out-of-bounds index Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Week Day schedule with out-of-bounds index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, - [NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, + [NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112026,29 +112107,29 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Week Day schedule with 0 user index Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Week Day schedule with 0 user index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 0U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 0U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112065,30 +112146,30 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Week Day schedule with out-of-bounds user index Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Week Day schedule with out-of-bounds user index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue( - "userIndex", actualValue, [NumberOfTotalUsersSupported unsignedShortValue] + 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue( + "userIndex", actualValue, [NumberOfTotalUsersSupported unsignedShortValue] + 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112105,29 +112186,29 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Week Day schedule with non-existing user index Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Week Day schedule with non-existing user index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112145,17 +112226,17 @@ class DL_Schedules : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - [cluster - setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule with 0 index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule with 0 index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112173,17 +112254,17 @@ class DL_Schedules : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - [cluster - setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule with out-of-bounds index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule with out-of-bounds index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112201,17 +112282,17 @@ class DL_Schedules : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:0U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - [cluster - setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule with 0 user index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule with 0 user index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112229,17 +112310,17 @@ class DL_Schedules : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - [cluster - setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule with out-of-bounds user index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule with out-of-bounds user index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112257,22 +112338,22 @@ class DL_Schedules : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:2U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - [cluster - setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule for non-existing user Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule for non-existing user Error: %@", err); - CHIP_ERROR TestCreateYearDayScheduleWithStartHourLaterThatEndHour_31() + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateYearDayScheduleWithStartHourLaterThatEndHour_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device @@ -112285,17 +112366,17 @@ class DL_Schedules : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345688UL]; - [cluster - setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule with start hour later that end hour Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule with start hour later that end hour Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112312,29 +112393,29 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that previous operations did not create a schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that previous operations did not create a schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112351,29 +112432,29 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Year Day schedule with 0 index Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Year Day schedule with 0 index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 0U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112390,30 +112471,30 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Year Day schedule with out-of-bounds index Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Year Day schedule with out-of-bounds index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, - [NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, + [NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112430,29 +112511,29 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Year Day schedule with 0 user index Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Year Day schedule with 0 user index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 0U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 0U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112469,30 +112550,30 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Year Day schedule with out-of-bounds user index Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Year Day schedule with out-of-bounds user index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue( - "userIndex", actualValue, [NumberOfTotalUsersSupported unsignedShortValue] + 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue( + "userIndex", actualValue, [NumberOfTotalUsersSupported unsignedShortValue] + 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112509,29 +112590,29 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Year Day schedule with non-existing user index Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Year Day schedule with non-existing user index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112549,17 +112630,17 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Holiday schedule with 0 index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setHolidayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Holiday schedule with 0 index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112577,17 +112658,17 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Holiday schedule with out-of-bounds index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setHolidayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Holiday schedule with out-of-bounds index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112605,17 +112686,17 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345688UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; - [cluster - setHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Holiday schedule with start hour later that end hour Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setHolidayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Holiday schedule with start hour later that end hour Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112633,17 +112714,17 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:5U]; - [cluster - setHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Holiday schedule with invalid operating mode Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster setHolidayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Create Holiday schedule with invalid operating mode Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112659,24 +112740,24 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that previous operations did not create a schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that previous operations did not create a schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112692,24 +112773,24 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:0U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Holiday schedule with 0 index Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Holiday schedule with 0 index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 0U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 0U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112725,25 +112806,25 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfHolidaySchedulesSupported unsignedCharValue] + 1U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Holiday schedule with out-of-bounds index Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Holiday schedule with out-of-bounds index Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue( - "holidayIndex", actualValue, [NumberOfHolidaySchedulesSupported unsignedCharValue] + 1U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, + [NumberOfHolidaySchedulesSupported unsignedCharValue] + 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112762,13 +112843,13 @@ class DL_Schedules : public TestCommandBridge { params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; [cluster setHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Holiday schedule with valid parameters Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create Holiday schedule with valid parameters Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112784,39 +112865,39 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112838,13 +112919,13 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:18U]; params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with valid parameters Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with valid parameters Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112861,54 +112942,54 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); + } - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); + } - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); - } + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); + } - { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); - } + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); + } - { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); - } + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112927,13 +113008,13 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule with valid parameters Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule with valid parameters Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112950,39 +113031,39 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -112998,17 +113079,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Week Day schedule with 0 index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster + clearWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Week Day schedule with 0 index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113024,17 +113106,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Week Day schedule with out-of-bounds index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster + clearWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Week Day schedule with out-of-bounds index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113050,17 +113133,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Week Day schedule with 0 user index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster + clearWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Week Day schedule with 0 user index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113076,17 +113160,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; - [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Week Day schedule with out-of-bounds user index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster + clearWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Week Day schedule with out-of-bounds user index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113102,17 +113187,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Week Day schedule with non-existing user Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + [cluster + clearWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Week Day schedule with non-existing user Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113129,54 +113215,54 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that week day schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that week day schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); + } - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); + } - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); - } + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); + } - { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); - } + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); + } - { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); - } + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113193,39 +113279,39 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that year day schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that year day schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113241,39 +113327,39 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113289,17 +113375,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Year Day schedule with 0 index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster + clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Year Day schedule with 0 index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113315,17 +113402,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Year Day schedule with out-of-bounds index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster + clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Year Day schedule with out-of-bounds index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113341,17 +113429,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Year Day schedule with 0 user index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster + clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Year Day schedule with 0 user index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113367,17 +113456,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; - [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Year Day schedule with out-of-bounds user index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster + clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Year Day schedule with out-of-bounds user index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113393,17 +113483,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Year Day schedule with non-existing user Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + [cluster + clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Year Day schedule with non-existing user Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113420,54 +113511,54 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that week day schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that week day schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); + } - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); + } - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); - } + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); + } - { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); - } + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); + } - { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); - } + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113484,39 +113575,39 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that year day schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that year day schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113532,39 +113623,39 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113579,17 +113670,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:0U]; - [cluster clearHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Holiday schedule with 0 index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster + clearHolidayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Holiday schedule with 0 index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113604,17 +113696,18 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; - [cluster clearHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear Holiday schedule with out-of-bounds index Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); - NextTest(); - }]; + [cluster + clearHolidayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Clear Holiday schedule with out-of-bounds index Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_FIELD)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113631,54 +113724,54 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that week day schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that week day schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); + } - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); + } - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); - } + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); + } - { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); - } + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); + } - { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); - } + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113695,39 +113788,39 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that year day schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that year day schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113743,39 +113836,39 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that holiday schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113797,13 +113890,13 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:23U]; params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113820,54 +113913,54 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created week day schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created week day schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 2U)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 2U)); + } - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); + } - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); - } + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); + } - { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); - } + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); + } - { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); - } + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113886,13 +113979,13 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create another Year Day schedule with valid parameters Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create another Year Day schedule with valid parameters Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113909,39 +114002,39 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created year day schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created year day schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113960,13 +114053,13 @@ class DL_Schedules : public TestCommandBridge { params.localEndTime = [NSNumber numberWithUnsignedInt:1234567UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:1U]; [cluster setHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create another Holiday schedule with valid parameters Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create another Holiday schedule with valid parameters Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -113982,39 +114075,39 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created holiday schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created holiday schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 123456UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 123456UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 1234567UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 1234567UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 1U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114031,13 +114124,13 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear a single week day schedule for the first user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear a single week day schedule for the first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114054,29 +114147,29 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify cleared week day schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify cleared week day schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114093,13 +114186,13 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:254U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all remaining week day schedules for the first user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear all remaining week day schedules for the first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114116,29 +114209,29 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify cleared week schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify cleared week schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114155,39 +114248,39 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that first year day schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that first year day schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114204,39 +114297,39 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that second year day schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that second year day schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114252,39 +114345,39 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114300,39 +114393,39 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that second holiday schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that second holiday schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 123456UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 123456UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 1234567UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 1234567UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 1U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114354,13 +114447,13 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:23U]; params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114377,13 +114470,13 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear a single year day schedule for the first user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear a single year day schedule for the first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114400,29 +114493,29 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify cleared year day schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify cleared year day schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114439,13 +114532,13 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:254U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all remaining year schedules for the first user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear all remaining year schedules for the first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114462,29 +114555,29 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify that second year day schedule was cleared Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify that second year day schedule was cleared Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114501,54 +114594,54 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created week day schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created week day schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 2U)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 2U)); + } - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); + } - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); - } + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); + } - { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); - } + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); + } - { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); - } + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114565,13 +114658,13 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:254U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all remaining week day schedules for the first user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear all remaining week day schedules for the first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114593,13 +114686,13 @@ class DL_Schedules : public TestCommandBridge { params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create new user without credential so we can add more schedules to it Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create new user without credential so we can add more schedules to it Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114621,13 +114714,13 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:23U]; params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with valid parameters for first user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with valid parameters for first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114644,54 +114737,54 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created week day schedule for first user Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created week day schedule for first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); + } - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); + } - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); - } + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); + } - { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); - } + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); + } - { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); - } + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114710,13 +114803,13 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule for first user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule for first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114733,39 +114826,39 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created year day schedule for first Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created year day schedule for first Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114787,13 +114880,13 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:23U]; params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule with valid parameters for second user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule with valid parameters for second user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114810,54 +114903,54 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created week day schedule for first user Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created week day schedule for first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 64U)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 64U)); + } - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 23U)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 23U)); + } - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); - } + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); + } - { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); - } + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); + } - { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); - } + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114876,13 +114969,13 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:55555UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:7777777UL]; [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule for second user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule for second user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114899,39 +114992,39 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created year day schedule for first Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created year day schedule for first Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 55555UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 55555UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 7777777UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 7777777UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114947,13 +115040,13 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Cleanup the user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -114970,29 +115063,29 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing first user also cleared week day schedules Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure clearing first user also cleared week day schedules Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115009,29 +115102,29 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing first user also cleared year day schedules Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure clearing first user also cleared year day schedules Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115048,29 +115141,29 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing second user also cleared week day schedules Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure clearing second user also cleared week day schedules Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115087,29 +115180,29 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing second user also cleared year day schedules Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure clearing second user also cleared year day schedules Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115125,39 +115218,39 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115173,39 +115266,39 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that second holiday schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that second holiday schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 123456UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 123456UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 1234567UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 1234567UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 1U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115224,13 +115317,13 @@ class DL_Schedules : public TestCommandBridge { params.localEndTime = [NSNumber numberWithUnsignedInt:100UL]; params.operatingMode = [NSNumber numberWithUnsignedChar:4U]; [cluster setHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create another Holiday schedule at the last slot Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create another Holiday schedule at the last slot Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115245,40 +115338,41 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NumberOfHolidaySchedulesSupported copy]; - [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify Created Holiday Schedule Error: %@", err); + [cluster + getHolidayScheduleWithParams:params + completion:^( + MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify Created Holiday Schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, NumberOfHolidaySchedulesSupported)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, NumberOfHolidaySchedulesSupported)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 1UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 1UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 100UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 100UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 4U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115303,30 +115397,30 @@ class DL_Schedules : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and schedule user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and schedule user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115348,13 +115442,13 @@ class DL_Schedules : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:23U]; params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Week Day schedule for first user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create Week Day schedule for first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115373,13 +115467,13 @@ class DL_Schedules : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create Year Day schedule for first user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create Year Day schedule for first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115395,13 +115489,13 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster clearHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear a single holiday schedule Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear a single holiday schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115417,39 +115511,39 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that first holiday schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 12345UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 12345689UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115465,24 +115559,24 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that second holiday schedule was deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that second holiday schedule was deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115497,40 +115591,41 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NumberOfHolidaySchedulesSupported copy]; - [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that third holiday schedule was not deleted Error: %@", err); + [cluster + getHolidayScheduleWithParams:params + completion:^( + MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that third holiday schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, NumberOfHolidaySchedulesSupported)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, NumberOfHolidaySchedulesSupported)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 1UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 1UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 100UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 100UL)); + } - { - id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 4U)); - } + { + id actualValue = values.operatingMode; + VerifyOrReturn(CheckValue("operatingMode", actualValue, 4U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115547,54 +115642,54 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing holiday schedule did not clear week day schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure clearing holiday schedule did not clear week day schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); + } - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); + } - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); - } + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); + } - { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); - } + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); + } - { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); - } + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115611,39 +115706,39 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing holiday schedule did not clear year day schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure clearing holiday schedule did not clear year day schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115659,13 +115754,13 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:254U]; [cluster clearHolidayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear all remaining holiday schedules Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear all remaining holiday schedules Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115681,24 +115776,24 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that first holiday is still deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that first holiday is still deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115714,24 +115809,24 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that second holiday schedule was deleted Error: %@", err); + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure that second holiday schedule was deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115746,25 +115841,26 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.holidayIndex = [NumberOfHolidaySchedulesSupported copy]; - [cluster getHolidayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure that third holiday schedule was not deleted Error: %@", err); + [cluster + getHolidayScheduleWithParams:params + completion:^( + MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Make sure that third holiday schedule was not deleted Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, NumberOfHolidaySchedulesSupported)); - } + { + id actualValue = values.holidayIndex; + VerifyOrReturn(CheckValue("holidayIndex", actualValue, NumberOfHolidaySchedulesSupported)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115781,54 +115877,54 @@ class DL_Schedules : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing holiday schedule did not clear week day schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure clearing holiday schedule did not clear week day schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); + } - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); + } - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); - } + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); + } - { - id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); - } + { + id actualValue = values.endHour; + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); + } - { - id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); - } + { + id actualValue = values.endMinute; + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115845,39 +115941,39 @@ class DL_Schedules : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Make sure clearing holiday schedule did not clear year day schedule Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Make sure clearing holiday schedule did not clear year day schedule Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 9000UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 888888888UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -115893,13 +115989,13 @@ class DL_Schedules : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Final Cleanup Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Final Cleanup Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -116463,7 +116559,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116488,7 +116584,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116513,7 +116609,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DRLK.S.F00(PIN) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116533,7 +116629,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DRLK.S.F01(RID) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116553,7 +116649,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DRLK.S.F02(FGP) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116573,7 +116669,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DRLK.S.F04(WDSCH) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116593,7 +116689,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DRLK.S.F05(DPS) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116613,7 +116709,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DRLK.S.F06(FACE) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116633,7 +116729,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DRLK.S.F07(COTA) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116653,7 +116749,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DRLK.S.F08(USR) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116673,7 +116769,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DRLK.S.F0a(YDSCH) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116693,7 +116789,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given DRLK.S.F0b(HDSCH) ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116713,7 +116809,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116744,7 +116840,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DRLK.S.F05) attributes in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116766,7 +116862,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DRLK.S.F08) attributes in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116790,7 +116886,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DRLK.S.F00) attributes in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116814,7 +116910,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DRLK.S.F01) attributes in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116838,7 +116934,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DRLK.S.F04) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116860,7 +116956,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DRLK.S.F0a) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116882,7 +116978,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DRLK.S.F0b) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116904,7 +117000,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DRLK.S.F00 or DRLK.S.F01) attributes in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116927,7 +117023,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent(DRLK.S.F07 or DRLK.S.F00) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116949,7 +117045,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(Language) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116971,7 +117067,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(LEDSettings) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -116993,7 +117089,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(AutoRelockTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117015,7 +117111,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(SoundVolume) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117037,7 +117133,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(DefaultConfigurationRegister) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117059,7 +117155,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(EnableLocalProgramming) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117081,7 +117177,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(EnableOneTouchLocking) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117103,7 +117199,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(EnableInsideStatusLED) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117125,7 +117221,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(EnablePrivacyModeButton) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117147,7 +117243,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional attribute(LocalProgrammingFeatures) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117169,7 +117265,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117192,7 +117288,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent commands(DRLK.S.F04) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117216,7 +117312,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent commands(DRLK.S.F0a) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117240,7 +117336,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent commands(DRLK.S.F0b) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117264,7 +117360,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent commands(DRLK.S.F08) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117291,7 +117387,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads optional commands(DRLK.S.C03.Rsp) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117313,7 +117409,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent command(DRLK.S.F04) in GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117335,7 +117431,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent command(DRLK.S.F0a) in GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117357,7 +117453,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent command(DRLK.S.F0b) in GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117379,7 +117475,7 @@ class Test_TC_DRLK_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads Feature dependent command(DRLK.S.F08) in GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -117782,13 +117878,13 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create new user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -117804,70 +117900,70 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -117892,29 +117988,29 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -117933,42 +118029,42 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created PIN credential Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created PIN credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -117984,15 +118080,15 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " - @"on the DUT Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes the RequirePINforRemoteOperation attribute value " + @"as False on the DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118007,20 +118103,22 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; - [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " + [cluster + writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes the RequirePINforRemoteOperation attribute value as False " @"on the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", - err); + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118033,19 +118131,18 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeRequirePINforRemoteOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, false)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, false)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118060,13 +118157,13 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT without PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Lock Door Command to the DUT without PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118082,13 +118179,13 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with valid PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Lock Door Command to the DUT with valid PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118104,15 +118201,15 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " - @"on the DUT Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes the RequirePINforRemoteOperation attribute value " + @"as False on the DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118127,20 +118224,22 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; - [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " + [cluster + writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes the RequirePINforRemoteOperation attribute value as False " @"on the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", - err); + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118153,19 +118252,18 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeRequirePINforRemoteOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, true)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, true)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118181,13 +118279,13 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with valid PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Lock Door Command to the DUT with valid PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118202,15 +118300,17 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"645321" length:6]; - [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT without valid PINCode Error: %@", err); + [cluster + lockDoorWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Lock Door Command to the DUT without valid PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118224,15 +118324,17 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT without any argument PINCode Error: %@", err); + [cluster + lockDoorWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Lock Door Command to the DUT without any argument PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118245,7 +118347,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeWrongCodeEntryLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the WrongCodeEntryLimit attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -118296,15 +118398,15 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on the " - @"DUT and Verify that the DUT sends Success response Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on " + @"the DUT and Verify that the DUT sends Success response Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118320,19 +118422,19 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on the " - @"DUT and verify DUT responds with UNSUPPORTED_WRITE Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on " + @"the DUT and verify DUT responds with UNSUPPORTED_WRITE Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118345,14 +118447,13 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the UserCodeTemporaryDisableTime attribute from the DUT Error: %@", err); + [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the UserCodeTemporaryDisableTime attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118368,17 +118469,17 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id userCodeTemporaryDisableTimeArgument; userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [cluster - writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as between 1 and " - @"255 on the DUT and Verify that the DUT sends Success response Error: %@", - err); + [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as " + @"between 1 and 255 on the DUT and Verify that the DUT sends " + @"Success response Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118394,21 +118495,21 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { id userCodeTemporaryDisableTimeArgument; userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [cluster - writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as between 1 and " - @"255 on the DUT and verify DUT responds with UNSUPPORTED_WRITE Error: %@", - err); + [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as " + @"between 1 and 255 on the DUT and verify DUT responds with " + @"UNSUPPORTED_WRITE Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118424,13 +118525,13 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clean the created user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clean the created user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118449,13 +118550,13 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created credential Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118943,13 +119044,13 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create new user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -118965,70 +119066,70 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119053,29 +119154,29 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119094,42 +119195,42 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created PIN credential Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created PIN credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119145,15 +119246,15 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " - @"on the DUT Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes the RequirePINforRemoteOperation attribute value " + @"as False on the DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119168,20 +119269,22 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:false]; - [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " + [cluster + writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes the RequirePINforRemoteOperation attribute value as False " @"on the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", - err); + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119194,19 +119297,18 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeRequirePINforRemoteOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, false)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, false)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119221,13 +119323,13 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT without PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT without PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119243,13 +119345,13 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119265,15 +119367,15 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " - @"on the DUT Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes the RequirePINforRemoteOperation attribute value " + @"as False on the DUT Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119288,20 +119390,22 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { id requirePINforRemoteOperationArgument; requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; - [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " + [cluster + writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes the RequirePINforRemoteOperation attribute value as False " @"on the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", - err); + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119314,19 +119418,18 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeRequirePINforRemoteOperationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); + [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the RequirePINforRemoteOperation attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, true)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("RequirePINforRemoteOperation", actualValue, true)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119342,13 +119445,13 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119365,14 +119468,15 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"1234568" length:7]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119388,14 +119492,15 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT without PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT without PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119411,15 +119516,15 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and Verify " - @"that the DUT sends Success response Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and " + @"Verify that the DUT sends Success response Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119435,19 +119540,19 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { id wrongCodeEntryLimitArgument; wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and verify DUT " - @"responds with UNSUPPORTED_WRITE Error: %@", - err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and " + @"verify DUT responds with UNSUPPORTED_WRITE Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119462,17 +119567,17 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { id userCodeTemporaryDisableTimeArgument; userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [cluster - writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 15 Seconds on " - @"the DUT and Verify that the DUT sends Success response Error: %@", - err); + [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 15 " + @"Seconds on the DUT and Verify that the DUT sends Success " + @"response Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119487,21 +119592,21 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { id userCodeTemporaryDisableTimeArgument; userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:15U]; - [cluster - writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 15 Seconds on " - @"the DUT and Verify that the DUT sends Success response Error: %@", - err); + [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 15 " + @"Seconds on the DUT and Verify that the DUT sends Success " + @"response Error: %@", + err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119518,14 +119623,15 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"1234568" length:7]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119542,14 +119648,15 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"1234568" length:7]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119566,14 +119673,15 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"1234568" length:7]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119590,14 +119698,15 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"1234568" length:7]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119610,8 +119719,7 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the UserCodeTemporaryDisableTime attribute from the DUT and check attribute is triggered Error: %@", err); @@ -119640,14 +119748,15 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119662,14 +119771,16 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { id autoRelockTimeArgument; autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:10UL]; - [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes AutoRelockTime attribute value as 10 seconds on the DUT Error: %@", err); + [cluster + writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes AutoRelockTime attribute value as 10 seconds on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119684,14 +119795,16 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { id autoRelockTimeArgument; autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; - [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); + [cluster + writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119708,16 +119821,18 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:10UL]; [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes AutoRelockTime attribute value as 10 seconds on the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes AutoRelockTime attribute value as 10 seconds on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119734,16 +119849,18 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119756,7 +119873,7 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAutoRelockTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the AutoRelockTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -119780,7 +119897,7 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAutoRelockTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the AutoRelockTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -119825,13 +119942,13 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -119850,13 +119967,13 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clean the created credential Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clean the created credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120063,13 +120180,13 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create new user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120085,70 +120202,70 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120173,29 +120290,29 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and lock/unlock user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120214,42 +120331,42 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Verify created PIN credential Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Verify created PIN credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, true)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120264,14 +120381,16 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { id autoRelockTimeArgument; autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; - [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); + [cluster + writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120288,16 +120407,18 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { autoRelockTimeArgument = [NSNumber numberWithUnsignedInt:60UL]; [cluster writeAttributeAutoRelockTimeWithValue:autoRelockTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog( + @"TH writes AutoRelockTime attribute value as 60 seconds on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120314,13 +120435,13 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { params.timeout = [NSNumber numberWithUnsignedShort:60U]; params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; [cluster unlockWithTimeoutWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends the Unlock with Timeout argument value as 60 seconds Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends the Unlock with Timeout argument value as 60 seconds Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120340,7 +120461,7 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLockStateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads LockState attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -120368,13 +120489,13 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120393,13 +120514,13 @@ class Test_TC_DRLK_2_4 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clean the created credential Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clean the created credential Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120614,13 +120735,13 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create new user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120636,70 +120757,70 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120713,7 +120834,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:^( + [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NumberOfWeekDay SchedulesSupportedPerUser attribute Error: %@", err); @@ -120742,8 +120863,7 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NumberOfTotalUsers Supported attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -120777,13 +120897,13 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.endHour = [NSNumber numberWithUnsignedChar:16U]; params.endMinute = [NSNumber numberWithUnsignedChar:55U]; [cluster setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120801,57 +120921,58 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); + completion:^( + MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 2U)); - } + { + id actualValue = values.daysMask; + VerifyOrReturn(CheckValue("daysMask", actualValue, 2U)); + } - { - id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); - } + { + id actualValue = values.startHour; + VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); + } - { - id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 45U)); - } + { + id actualValue = values.startMinute; + VerifyOrReturn(CheckValue("startMinute", actualValue, 45U)); + } - VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, true)); - if (values.endHour != nil) { + VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, true)); + if (values.endHour != nil) { - VerifyOrReturn(CheckConstraintMinValue("endHour", [values.endHour unsignedCharValue], 16U)); - } + VerifyOrReturn( + CheckConstraintMinValue("endHour", [values.endHour unsignedCharValue], 16U)); + } - VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, true)); - if (values.endMinute != nil) { + VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, true)); + if (values.endMinute != nil) { - VerifyOrReturn( - CheckConstraintMinValue("endMinute", [values.endMinute unsignedCharValue], 55U)); - } + VerifyOrReturn( + CheckConstraintMinValue("endMinute", [values.endMinute unsignedCharValue], 55U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120872,17 +120993,17 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.startMinute = [NSNumber numberWithUnsignedChar:45U]; params.endHour = [NSNumber numberWithUnsignedChar:16U]; params.endMinute = [NSNumber numberWithUnsignedChar:55U]; - [cluster - setWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + [cluster setWeekDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH send Set Week Day Schedule Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120899,49 +121020,49 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH send Get Week Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); - if (values.daysMask != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); + if (values.daysMask != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); - if (values.startHour != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); + if (values.startHour != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); - if (values.startMinute != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); + if (values.startMinute != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); - if (values.endHour != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); + if (values.endHour != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); - if (values.endMinute != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); + if (values.endMinute != nil) { + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120958,13 +121079,13 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Week Day Schedule Command to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Week Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -120981,49 +121102,49 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Week Day Schedule Command to DUT Error: %@", err); + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Week Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); - } + { + id actualValue = values.weekDayIndex; + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); - if (values.daysMask != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); + if (values.daysMask != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); - if (values.startHour != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, false)); + if (values.startHour != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); - if (values.startMinute != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, false)); + if (values.startMinute != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); - if (values.endHour != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, false)); + if (values.endHour != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); - if (values.endMinute != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, false)); + if (values.endMinute != nil) { + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121039,13 +121160,13 @@ class Test_TC_DRLK_2_5 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121322,13 +121443,13 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create new user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create new user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121344,70 +121465,70 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121421,7 +121542,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:^( + [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NumberOfYearDay SchedulesSupportedPerUser attribute Error: %@", err); @@ -121450,8 +121571,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NumberOfTotalUsers Supported attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -121482,13 +121602,13 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:960UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:1980UL]; [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121505,45 +121625,45 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 960UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 960UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 1980UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 1980UL)); + } - if (values.localEndTime != nil) { + if (values.localEndTime != nil) { - VerifyOrReturn(CheckConstraintMinValue( - "localEndTime", [values.localEndTime unsignedIntValue], 961UL)); - } + VerifyOrReturn(CheckConstraintMinValue( + "localEndTime", [values.localEndTime unsignedIntValue], 961UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121561,17 +121681,17 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:15U]; params.localStartTime = [NSNumber numberWithUnsignedInt:1020UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:2040UL]; - [cluster - setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH send Set Year Day Schedule Command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH send Set Year Day Schedule Command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121588,37 +121708,37 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:15U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 0U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 15U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 15U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); - if (values.localStartTime != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); - if (values.localEndTime != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121640,13 +121760,13 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create a user with userIndex as 5 Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create a user with userIndex as 5 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121662,39 +121782,39 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; params.yearDayIndex = [NumberOfYearDaySchedulesSupportedPerUser copy]; params.userIndex = [NSNumber numberWithUnsignedShort:5U]; - [cluster - getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + [cluster getYearDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, NumberOfYearDaySchedulesSupportedPerUser)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn( + CheckValue("yearDayIndex", actualValue, NumberOfYearDaySchedulesSupportedPerUser)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 5U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 5U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); - if (values.localStartTime != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); - if (values.localEndTime != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121711,13 +121831,13 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121734,37 +121854,37 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); - if (values.localStartTime != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); + if (values.localStartTime != nil) { + } - VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); - if (values.localEndTime != nil) { - } + VerifyOrReturn(CheckConstraintHasValue("localEndTime", values.localEndTime, false)); + if (values.localEndTime != nil) { + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121783,13 +121903,13 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.localStartTime = [NSNumber numberWithUnsignedInt:1080UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:2100UL]; [cluster setYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Set Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121806,45 +121926,45 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params - completionHandler:^( - MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Year Day Schedule Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); - } + { + id actualValue = values.yearDayIndex; + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.localStartTime; - VerifyOrReturn(CheckValue("localStartTime", actualValue, 1080UL)); - } + { + id actualValue = values.localStartTime; + VerifyOrReturn(CheckValue("localStartTime", actualValue, 1080UL)); + } - { - id actualValue = values.localEndTime; - VerifyOrReturn(CheckValue("localEndTime", actualValue, 2100UL)); - } + { + id actualValue = values.localEndTime; + VerifyOrReturn(CheckValue("localEndTime", actualValue, 2100UL)); + } - if (values.localEndTime != nil) { + if (values.localEndTime != nil) { - VerifyOrReturn(CheckConstraintMinValue( - "localEndTime", [values.localEndTime unsignedIntValue], 1081UL)); - } + VerifyOrReturn(CheckConstraintMinValue( + "localEndTime", [values.localEndTime unsignedIntValue], 1081UL)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121860,17 +121980,18 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + [cluster + clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Year Day Schedule to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121887,13 +122008,13 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear a year day schedule for the first user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Clear a year day schedule for the first user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -121909,13 +122030,13 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122232,13 +122353,13 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Create new user with default parameters Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Create new user with default parameters Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122254,70 +122375,70 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params - completionHandler:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and verify its fields Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } - - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); - } - - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); - VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); - } - - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); - } - - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0U)); - } - - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); - } - - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); - } - - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } - - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); - } - - NextTest(); - }]; + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user back and verify its fields Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"xxx")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNonNull("userUniqueId", actualValue)); + VerifyOrReturn(CheckValue("userUniqueId", actualValue, 6452UL)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNull("nextUserIndex", actualValue)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122331,8 +122452,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads NumberOfTotalUsersSupported attribute and saves for future use. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -122369,29 +122489,29 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122410,38 +122530,38 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + VerifyOrReturn(CheckConstraintType("credentialExists", "boolean", "boolean")); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122466,29 +122586,29 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:10U]; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 133U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122513,29 +122633,29 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 2U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122584,13 +122704,13 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Credential Command to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Credential Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122609,39 +122729,39 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command to DUT Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122663,13 +122783,13 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = [NSNumber numberWithUnsignedChar:0U]; params.credentialRule = [NSNumber numberWithUnsignedChar:0U]; [cluster setUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Set User Command to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Set User Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122694,29 +122814,29 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { params.userType = nil; [cluster setCredentialWithParams:params - completionHandler:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Set Credential Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122735,13 +122855,13 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Credential Command to DUT Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Credential Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122760,39 +122880,39 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122811,39 +122931,39 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params - completionHandler:^( - MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends Get Credential Status Command Error: %@", err); + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"TH sends Get Credential Status Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); - } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); - } + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122861,17 +122981,17 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { ((MTRDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:8U]; ((MTRDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; - [cluster - clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Clear Credential Command to DUT Error: %@", err); + [cluster clearCredentialWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends Clear Credential Command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_INVALID_COMMAND)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122887,13 +123007,13 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Cleanup the first created user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the first created user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -122909,13 +123029,13 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster clearUserWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Cleanup the second created user Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the second created user Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123195,23 +123315,23 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:0U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Group 0 (invalid) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View Group 0 (invalid) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 135U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 135U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 0U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123225,23 +123345,23 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View First Group (not found) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View First Group (not found) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123256,23 +123376,23 @@ class TestGroupsCluster : public TestCommandBridge { params.groupId = [NSNumber numberWithUnsignedShort:257U]; params.groupName = @"Group #1"; [cluster addGroupWithParams:params - completionHandler:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add First Group (no keys) Error: %@", err); + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Add First Group (no keys) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 126U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 126U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123305,13 +123425,13 @@ class TestGroupsCluster : public TestCommandBridge { [NSNumber numberWithUnsignedLongLong:1110002ULL]; [cluster keySetWriteWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Add KeySet Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Add KeySet Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123340,13 +123460,13 @@ class TestGroupsCluster : public TestCommandBridge { groupKeyMapArgument = temp_0; } [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write Group Keys Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123361,23 +123481,23 @@ class TestGroupsCluster : public TestCommandBridge { params.groupId = [NSNumber numberWithUnsignedShort:257U]; params.groupName = @"Group #1"; [cluster addGroupWithParams:params - completionHandler:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add First Group (new) Error: %@", err); + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Add First Group (new) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123391,28 +123511,28 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View First Group (new) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View First Group (new) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + } - { - id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #1")); - } + { + id actualValue = values.groupName; + VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #1")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123426,23 +123546,23 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Second Group (not found) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View Second Group (not found) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123459,25 +123579,25 @@ class TestGroupsCluster : public TestCommandBridge { params.groupList = temp_0; } [cluster getGroupMembershipWithParams:params - completionHandler:^( - MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Group Membership 1 (all) Error: %@", err); + completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Group Membership 1 (all) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.capacity; - VerifyOrReturn(CheckValueNull("capacity", actualValue)); - } + { + id actualValue = values.capacity; + VerifyOrReturn(CheckValueNull("capacity", actualValue)); + } - { - id actualValue = values.groupList; - VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 257U)); - } + { + id actualValue = values.groupList; + VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 257U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123492,23 +123612,23 @@ class TestGroupsCluster : public TestCommandBridge { params.groupId = [NSNumber numberWithUnsignedShort:258U]; params.groupName = @"Group #2"; [cluster addGroupWithParams:params - completionHandler:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Second Group (new) Error: %@", err); + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Add Second Group (new) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123522,28 +123642,28 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Second Group (new) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View Second Group (new) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + } - { - id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #2")); - } + { + id actualValue = values.groupName; + VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #2")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123557,23 +123677,23 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:32767U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Group 3 (not found) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View Group 3 (not found) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 32767U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 32767U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123587,28 +123707,28 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View First Group (existing) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View First Group (existing) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + } - { - id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #1")); - } + { + id actualValue = values.groupName; + VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #1")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123622,28 +123742,28 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Second Group (existing) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View Second Group (existing) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + } - { - id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #2")); - } + { + id actualValue = values.groupName; + VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #2")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123663,25 +123783,25 @@ class TestGroupsCluster : public TestCommandBridge { params.groupList = temp_0; } [cluster getGroupMembershipWithParams:params - completionHandler:^( - MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Group Membership 2 Error: %@", err); + completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Group Membership 2 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.capacity; - VerifyOrReturn(CheckValueNull("capacity", actualValue)); - } + { + id actualValue = values.capacity; + VerifyOrReturn(CheckValueNull("capacity", actualValue)); + } - { - id actualValue = values.groupList; - VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 258U)); - } + { + id actualValue = values.groupList; + VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 258U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123695,23 +123815,23 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:0U]; [cluster removeGroupWithParams:params - completionHandler:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove Group 0 (invalid) Error: %@", err); + completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Remove Group 0 (invalid) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 135U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 135U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 0U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123725,23 +123845,23 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:260U]; [cluster removeGroupWithParams:params - completionHandler:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove Group 4 (not found) Error: %@", err); + completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Remove Group 4 (not found) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 260U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 260U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123755,23 +123875,23 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster removeGroupWithParams:params - completionHandler:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove Second Group (existing) Error: %@", err); + completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Remove Second Group (existing) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123785,28 +123905,28 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View First Group (not removed) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View First Group (not removed) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + } - { - id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #1")); - } + { + id actualValue = values.groupName; + VerifyOrReturn(CheckValueAsString("groupName", actualValue, @"Group #1")); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123820,23 +123940,23 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Second Group (removed) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View Second Group (removed) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123857,25 +123977,25 @@ class TestGroupsCluster : public TestCommandBridge { params.groupList = temp_0; } [cluster getGroupMembershipWithParams:params - completionHandler:^( - MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Group Membership 3 Error: %@", err); + completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Group Membership 3 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.capacity; - VerifyOrReturn(CheckValueNull("capacity", actualValue)); - } + { + id actualValue = values.capacity; + VerifyOrReturn(CheckValueNull("capacity", actualValue)); + } - { - id actualValue = values.groupList; - VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 257U)); - } + { + id actualValue = values.groupList; + VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 257U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123886,7 +124006,7 @@ class TestGroupsCluster : public TestCommandBridge { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster removeAllGroupsWithCompletionHandler:^(NSError * _Nullable err) { + [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { NSLog(@"Remove All Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -123906,23 +124026,23 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View First Group (removed) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View First Group (removed) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123936,23 +124056,23 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:258U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Second Group (still removed) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View Second Group (still removed) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -123966,23 +124086,23 @@ class TestGroupsCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:32767U]; [cluster viewGroupWithParams:params - completionHandler:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"View Group 3 (removed) Error: %@", err); + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"View Group 3 (removed) Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 139U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 32767U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 32767U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124004,24 +124124,24 @@ class TestGroupsCluster : public TestCommandBridge { params.groupList = temp_0; } [cluster getGroupMembershipWithParams:params - completionHandler:^( - MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Get Group Membership 4 Error: %@", err); + completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Get Group Membership 4 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.capacity; - VerifyOrReturn(CheckValueNull("capacity", actualValue)); - } + { + id actualValue = values.capacity; + VerifyOrReturn(CheckValueNull("capacity", actualValue)); + } - { - id actualValue = values.groupList; - VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(0))); - } + { + id actualValue = values.groupList; + VerifyOrReturn(CheckValue("groupList", [actualValue count], static_cast(0))); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124265,7 +124385,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxGroupsPerFabricWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read maxGroupsPerFabric Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -124286,7 +124406,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxGroupKeysPerFabricWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Read maxGroupKeysPerFabric Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -124327,13 +124447,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { [NSNumber numberWithUnsignedLongLong:1110002ULL]; [cluster keySetWriteWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 1 Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 1 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124366,13 +124486,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { [NSNumber numberWithUnsignedLongLong:2110002ULL]; [cluster keySetWriteWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"KeySet Write 2 Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Write 2 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124389,40 +124509,40 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; [cluster keySetReadWithParams:params - completionHandler:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.groupKeySet; - VerifyOrReturn(CheckValue( - "GroupKeySetID", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); - VerifyOrReturn( - CheckValueNull("EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); - VerifyOrReturn(CheckValueNonNull( - "EpochStartTime0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); - VerifyOrReturn(CheckValue("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 1110000ULL)); - VerifyOrReturn( - CheckValueNull("EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); - VerifyOrReturn(CheckValueNonNull( - "EpochStartTime1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); - VerifyOrReturn(CheckValue("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 1110001ULL)); - VerifyOrReturn( - CheckValueNull("EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); - VerifyOrReturn(CheckValueNonNull( - "EpochStartTime2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); - VerifyOrReturn(CheckValue("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 1110002ULL)); - } - - NextTest(); - }]; + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"KeySet Read Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.groupKeySet; + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 417U)); + VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); + VerifyOrReturn(CheckValueNull( + "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); + VerifyOrReturn(CheckValue("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 1110000ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); + VerifyOrReturn(CheckValue("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 1110001ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); + VerifyOrReturn(CheckValue("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 1110002ULL)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124446,16 +124566,17 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { groupKeyMapArgument = temp_0; } [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys (invalid) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + completion:^(NSError * _Nullable err) { + NSLog(@"Write Group Keys (invalid) Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124494,16 +124615,17 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { groupKeyMapArgument = temp_0; } [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys (too many) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + completion:^(NSError * _Nullable err) { + NSLog(@"Write Group Keys (too many) Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] + ? err.code + : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124537,13 +124659,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { groupKeyMapArgument = temp_0; } [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write Group Keys Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"Write Group Keys Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124560,36 +124682,43 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { params.fabricFiltered = [NSNumber numberWithBool:true]; [cluster readAttributeGroupKeyMapWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Group Keys Error: %@", err); + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Group Keys Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupKeyMap", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 258U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn( + CheckValue("GroupKeyMap", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 257U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, + 417U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, + 417U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupId, 258U)); + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).groupKeySetID, + 418U)); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[2]).fabricIndex, + 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124604,23 +124733,23 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { params.groupId = [NSNumber numberWithUnsignedShort:257U]; params.groupName = @"Group #1"; [cluster addGroupWithParams:params - completionHandler:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 1 Error: %@", err); + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Add Group 1 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124635,23 +124764,23 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { params.groupId = [NSNumber numberWithUnsignedShort:258U]; params.groupName = @"Group #2"; [cluster addGroupWithParams:params - completionHandler:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Add Group 2 Error: %@", err); + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Add Group 2 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 258U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124666,33 +124795,36 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster readAttributeGroupTableWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable Error: %@", err); + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GroupTable Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 257U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #1")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, 1U)); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, - @"Group #2")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 257U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, + @"Group #1")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, + 1U)); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, + @"Group #2")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, + 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124708,13 +124840,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; [cluster keySetRemoveWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"KeySet Remove 1 Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Remove 1 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124731,15 +124863,16 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { params.groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; [cluster keySetReadWithParams:params - completionHandler:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (removed) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_NOT_FOUND)); - NextTest(); - }]; + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"KeySet Read (removed) Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_NOT_FOUND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124756,40 +124889,40 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; [cluster keySetReadWithParams:params - completionHandler:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (not removed) Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.groupKeySet; - VerifyOrReturn(CheckValue( - "GroupKeySetID", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 1U)); - VerifyOrReturn( - CheckValueNull("EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); - VerifyOrReturn(CheckValueNonNull( - "EpochStartTime0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); - VerifyOrReturn(CheckValue("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2110000ULL)); - VerifyOrReturn( - CheckValueNull("EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); - VerifyOrReturn(CheckValueNonNull( - "EpochStartTime1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); - VerifyOrReturn(CheckValue("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2110001ULL)); - VerifyOrReturn( - CheckValueNull("EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); - VerifyOrReturn(CheckValueNonNull( - "EpochStartTime2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); - VerifyOrReturn(CheckValue("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2110002ULL)); - } - - NextTest(); - }]; + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"KeySet Read (not removed) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.groupKeySet; + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 418U)); + VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 1U)); + VerifyOrReturn(CheckValueNull( + "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); + VerifyOrReturn(CheckValue("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2110000ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); + VerifyOrReturn(CheckValue("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2110001ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); + VerifyOrReturn(CheckValue("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2110002ULL)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124803,23 +124936,23 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupsClusterRemoveGroupParams alloc] init]; params.groupId = [NSNumber numberWithUnsignedShort:257U]; [cluster removeGroupWithParams:params - completionHandler:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Remove Group 1 Error: %@", err); + completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Remove Group 1 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - { - id actualValue = values.groupId; - VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); - } + { + id actualValue = values.groupId; + VerifyOrReturn(CheckValue("groupId", actualValue, 257U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124834,26 +124967,28 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster readAttributeGroupTableWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable 2 Error: %@", err); + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GroupTable 2 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 258U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Group #2")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, 1U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 258U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, + @"Group #2")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, + 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124864,7 +124999,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster removeAllGroupsWithCompletionHandler:^(NSError * _Nullable err) { + [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { NSLog(@"Remove All Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -124885,19 +125020,20 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { MTRReadParams * params = [[MTRReadParams alloc] init]; params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster readAttributeGroupTableWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read GroupTable 3 Error: %@", err); + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GroupTable 3 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(0))); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(0))); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124913,13 +125049,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; [cluster keySetRemoveWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"KeySet Remove 2 Error: %@", err); + completion:^(NSError * _Nullable err) { + NSLog(@"KeySet Remove 2 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -124936,15 +125072,16 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { params.groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; [cluster keySetReadWithParams:params - completionHandler:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"KeySet Read (also removed) Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_NOT_FOUND)); - NextTest(); - }]; + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"KeySet Read (also removed) Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_NOT_FOUND)); + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -125089,7 +125226,7 @@ class Test_TC_G_1_1 : public TestCommandBridge { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -125112,7 +125249,7 @@ class Test_TC_G_1_1 : public TestCommandBridge { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -125135,7 +125272,7 @@ class Test_TC_G_1_1 : public TestCommandBridge { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Given G.S.F00 ensure featuremap has the correct bit set Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -125153,7 +125290,7 @@ class Test_TC_G_1_1 : public TestCommandBridge { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -125178,7 +125315,7 @@ class Test_TC_G_1_1 : public TestCommandBridge { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -125203,7 +125340,7 @@ class Test_TC_G_1_1 : public TestCommandBridge { MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0));